1 Load data

# Read
file = "DATE O1A.xlsx"
Date <- readxl::read_xlsx(file, sheet = "date", skip = 5, col_names = FALSE)

1.1 Processing data

# Clean
varnames <- c("Nr_crt", "ID", "Nume_Prenume", "Zi", "Vas_stres_pre", "Vas_bine_pre",
             sprintf("Stais_pre_%01d", seq(1,20)),
             "SOP",
             "IOS_mama", "IOS_tata", "IOS_iubit", "IOS_prieten", "IOS_personalitate",
             "Vas_rel_global", "Vas_rel_arousal",
             "CRQ_1", "CRQ_2", "CRQ_3", "CRQ_4", "CRQ_5", "CRQ_6",
             "Vas_stres_post", "Vas_bine_post",
             sprintf("Stais_post_%01d", seq(1,20))
)
names(Date) <- varnames   # nume noi
Date <- Date[-c(1:2),]    # scoatem randurile cu numele precedente
Date$Nr_crt <- 1:nrow(Date)   # era gol, asa ca numerotam randurile ca sa avem acesta variabila 
# Process NAs
Date <- Date %>% 
    mutate(NA_per_row = rowSums(is.na(.)))     # count NAs by row
Date <- Date %>% 
    filter(NA_per_row < 20)         # arbitrary cutoff for NAs on columns ... it is normal to have 4 NAs for all columns

1.2 Compute new variables

# Compute new variables 
Conditie <- Date %>% 
    select(Nr_crt, ID, IOS_mama, IOS_tata, IOS_iubit, IOS_prieten, IOS_personalitate) %>% 
    gather(type, value, -c(Nr_crt, ID)) %>% 
    mutate(Conditie = ifelse(!is.na(value), type, NA) ) %>%
    mutate(Conditie = str_replace(Conditie, "IOS_", "")) %>%
    arrange(Nr_crt) %>%
    select(Conditie) %>% na.omit() 
Date$Conditie <- Conditie$Conditie     # tidyverse returns tibble, must do this
IOS <- Date %>% 
  mutate(IOS = coalesce(IOS_mama, IOS_tata, IOS_iubit, IOS_prieten, IOS_personalitate)) %>%
  select(IOS)
Date$IOS <- IOS$IOS   # tidyverse returns tibble, must do this
rm(Conditie, IOS)    # remove 2 tibbles
# Scoring Stai   (convert numeric - VAS)
itemiVAS <- c(5, 6, 41, 42)
itemiStaiS_pre <- 7:26
itemiStaiS_post <- 43:62
ReversedItems <- c(1,2,5,8,10,11,15,16,19,20)
Date <- Date %>%                 
  replace(Date == "na", NA) %>%        # scimbam codarea cu na a Doinei
  mutate_at(vars(itemiStaiS_pre), funs(as.numeric)) %>%        # facem coloanele numerice pt STAI
  mutate_at(vars(itemiStaiS_post), funs(as.numeric)) %>% 
  mutate_at(vars(itemiVAS), funs(as.numeric))
Date[ ,itemiStaiS_pre[ReversedItems]] = 5 - Date[ ,itemiStaiS_pre[ReversedItems]]
Date[ ,itemiStaiS_post[ReversedItems]] = 5 - Date[ ,itemiStaiS_post[ReversedItems]]
Date$StaiS_pre = rowSums(Date[ ,itemiStaiS_pre], na.rm=T ) * NA ^ (rowSums(!is.na(Date[ ,itemiStaiS_pre])) == 0)
Date$StaiS_post = rowSums(Date[ ,itemiStaiS_post], na.rm=T ) * NA ^ (rowSums(!is.na(Date[ ,itemiStaiS_post])) == 0)


2 STAI-Y

2.1 Plots with p values

## STAI plot 
Staimelt <- Date[, c("ID", "Conditie", "StaiS_pre","StaiS_post")] %>% 
  gather("StaiS_pre", "StaiS_post", key = "Stai_cond", value = "value") %>% 
  mutate_at(vars(c(1, 2,3)), funs(as.factor)) %>% 
  mutate(Stai_cond = factor(Stai_cond, levels = c("StaiS_pre","StaiS_post"))) # %>%    # change factor order for plot pre, post
ggplot(Staimelt, aes(x = Stai_cond, y = value)) +
  geom_boxplot() +
  facet_wrap(~Conditie) +
  ggpubr::stat_compare_means(method = "t.test", paired = TRUE, comparisons = list(c("StaiS_pre","StaiS_post")))

2.2 t tests

## STAI tables
Date %>% 
  group_by(Conditie) %>% 
  do(broom::tidy(t.test(.$StaiS_pre, 
                        .$StaiS_post, 
                        mu = 0, 
                        alt = "two.sided", 
                        paired = TRUE, 
                        conf.level = 0.95))) %>%
  knitr::kable(digits = 2)
Conditie estimate statistic p.value parameter conf.low conf.high method alternative
iubit 0.71 0.48 0.64 27 -2.34 3.77 Paired t-test two.sided
mama 0.09 0.09 0.93 33 -1.98 2.16 Paired t-test two.sided
personalitate 1.44 1.48 0.15 35 -0.53 3.42 Paired t-test two.sided
prieten 3.27 3.96 0.00 36 1.59 4.95 Paired t-test two.sided
tata -0.69 -0.91 0.37 34 -2.21 0.84 Paired t-test two.sided

2.3 Smaple size (n) for Power = .8, Sig level = .05, computed delta

stai_table <- 
Date %>% 
  group_by(Conditie) %>% 
  dplyr::summarize(mean_pre = mean(StaiS_pre, na.rm=TRUE),
                   mean_post = mean(StaiS_post, na.rm=TRUE),
                   mean_diff = mean(StaiS_pre, na.rm=TRUE) - mean(StaiS_post, na.rm=TRUE),   # m_pre - m_post
                   sd_pooled = sd(c(StaiS_pre, StaiS_post), na.rm=TRUE),                     # pooled sd
                   n_pre = sum(!is.na(StaiS_pre)),                                           # n 
                   n_post = sum(!is.na(StaiS_post)))                                         # n 
stai_power <- 
stai_table  %>% 
  rowwise()  %>%
  do(broom::tidy(power.t.test(power = .8, 
                              delta =  .$mean_diff,
                              sd =   .$sd_pooled,
                              sig.level = .05,
                              type = "paired",
                              alternative = "two.sided")))                                # determine sample size requirement
  
knitr::kable(cbind(stai_table, stai_power),
    digits = 2)
Conditie mean_pre mean_post mean_diff sd_pooled n_pre n_post n delta sd sig.level power
iubit 30.82 30.11 0.71 9.74 28 28 1462.52 0.71 9.74 0.05 0.8
mama 28.79 28.71 0.09 7.92 34 34 63270.54 0.09 7.92 0.05 0.8
personalitate 30.44 29.00 1.44 8.05 36 36 245.79 1.44 8.05 0.05 0.8
prieten 32.95 29.68 3.27 9.11 37 37 62.87 3.27 9.11 0.05 0.8
tata 29.54 30.23 -0.69 7.95 35 35 1056.96 0.69 7.95 0.05 0.8


3 VAS Stres

3.1 Plots with p values

## Vas Stres plot 
Vasstresmelt <- Date[, c("ID", "Conditie", "Vas_stres_pre","Vas_stres_post")] %>% 
  gather("Vas_stres_pre","Vas_stres_post", key = "Vas_stres_cond", value = "value") %>% 
  mutate_at(vars(c(1,2,3)), funs(as.factor)) %>% 
  mutate_at(vars(c(4)), funs(as.numeric)) %>% 
  mutate(Vas_stres_cond = factor(Vas_stres_cond, levels = c("Vas_stres_pre","Vas_stres_post"))) # change factor order for plot pre, post
ggplot(Vasstresmelt, aes(x = Vas_stres_cond, y = value)) +
  geom_boxplot() +
  facet_wrap(~Conditie) +
  ggpubr::stat_compare_means(method = "t.test", paired = TRUE, comparisons = list(c("Vas_stres_pre","Vas_stres_post")))

3.2 t tests

## Vas Stres tables
Date %>% 
  group_by(Conditie) %>% 
  do(broom::tidy(t.test(.$Vas_stres_pre, 
                        .$Vas_stres_post, 
                        mu = 0, 
                        alt = "two.sided", 
                        paired = TRUE, 
                        conf.level = 0.95))) %>%
  knitr::kable(digits = 2)
Conditie estimate statistic p.value parameter conf.low conf.high method alternative
iubit 1.54 0.52 0.60 27 -4.47 7.55 Paired t-test two.sided
mama -1.53 -0.62 0.54 33 -6.56 3.50 Paired t-test two.sided
personalitate 0.06 0.03 0.97 35 -3.51 3.62 Paired t-test two.sided
prieten 3.65 1.78 0.08 36 -0.51 7.81 Paired t-test two.sided
tata -2.83 -1.43 0.16 34 -6.84 1.18 Paired t-test two.sided

3.3 Smaple size (n) for Power = .8, Sig level = .05, computed delta

VasS_table <- 
Date %>% 
  group_by(Conditie) %>% 
  dplyr::summarize(mean_pre = mean(Vas_stres_pre, na.rm=TRUE),
                   mean_post = mean(Vas_stres_post, na.rm=TRUE),
                   mean_diff = mean(Vas_stres_pre, na.rm=TRUE) - mean(Vas_stres_post, na.rm=TRUE),   # m_pre - m_post
                   sd_pooled = sd(c(Vas_stres_pre, Vas_stres_post), na.rm=TRUE),                     # pooled sd
                   n_pre = sum(!is.na(Vas_stres_pre)),                                           # n 
                   n_post = sum(!is.na(Vas_stres_post)))                                        # n 
VasS_power <- 
VasS_table  %>%  
  rowwise()  %>%                   
  do(broom::tidy(power.t.test(power = .8, 
                              delta =  .$mean_diff,
                              sd =   .$sd_pooled,
                              sig.level = .05,
                              type = "paired",
                              alternative = "two.sided")))                              # determine sample size requirement
knitr::kable(cbind(VasS_table, VasS_power),
    digits = 2)
Conditie mean_pre mean_post mean_diff sd_pooled n_pre n_post n delta sd sig.level power
iubit 18.79 17.25 1.54 20.46 28 28 1395.03 1.54 20.46 0.05 0.8
mama 13.59 15.12 -1.53 15.89 34 34 848.99 1.53 15.89 0.05 0.8
personalitate 17.42 17.36 0.06 14.81 36 36 557933.90 0.06 14.81 0.05 0.8
prieten 24.65 21.00 3.65 19.48 37 37 225.70 3.65 19.48 0.05 0.8
tata 17.80 20.63 -2.83 19.25 35 35 365.58 2.83 19.25 0.05 0.8


4 VAS Wellbeing

4.1 Plots with p values

## Vas Stres plot 
Vasbinemelt <- Date[, c("ID", "Conditie", "Vas_bine_pre","Vas_bine_post")] %>% 
  gather("Vas_bine_pre","Vas_bine_post", key = "Vas_stres_cond", value = "value") %>% 
  mutate_at(vars(c(1,2,3)), funs(as.factor)) %>% 
  mutate_at(vars(c(4)), funs(as.numeric)) %>% 
  mutate(Vas_stres_cond = factor(Vas_stres_cond, levels = c("Vas_bine_pre","Vas_bine_post"))) # change factor order for plot pre, post
ggplot(Vasbinemelt, aes(x = Vas_stres_cond, y = value)) +
  geom_boxplot() +
  facet_wrap(~Conditie) +
  ggpubr::stat_compare_means(method = "t.test", paired = TRUE, comparisons = list(c("Vas_bine_pre","Vas_bine_post")))

4.2 t tests

## Vas Stres tables
Date %>% 
  group_by(Conditie) %>% 
  do(broom::tidy(t.test(.$Vas_bine_pre, 
                        .$Vas_bine_post, 
                        mu = 0, 
                        alt = "two.sided", 
                        paired = TRUE, 
                        conf.level = 0.95))) %>%
  knitr::kable(digits = 2)
Conditie estimate statistic p.value parameter conf.low conf.high method alternative
iubit -2.14 -0.70 0.49 27 -8.40 4.11 Paired t-test two.sided
mama -0.21 -0.08 0.94 33 -5.36 4.94 Paired t-test two.sided
personalitate -1.69 -0.77 0.44 35 -6.14 2.76 Paired t-test two.sided
prieten -5.81 -3.19 0.00 36 -9.51 -2.12 Paired t-test two.sided
tata -2.29 -0.65 0.52 34 -9.48 4.91 Paired t-test two.sided

4.3 Smaple size (n) for Power = .8, Sig level = .05, computed delta

VasB_table <- 
Date %>% 
  group_by(Conditie) %>% 
  dplyr::summarize(mean_pre = mean(Vas_bine_pre, na.rm=TRUE),
                   mean_post = mean(Vas_bine_post, na.rm=TRUE),
                   mean_diff = mean(Vas_bine_pre, na.rm=TRUE) - mean(Vas_bine_post, na.rm=TRUE),   # m_pre - m_post
                   sd_pooled = sd(c(Vas_bine_pre, Vas_bine_post), na.rm=TRUE),                     # pooled sd
                   n_pre = sum(!is.na(Vas_bine_pre)),                                           # n 
                   n_post = sum(!is.na(Vas_bine_post)))                                     # n 
VasB_power <-
VasB_table  %>%  
  rowwise()  %>%                   
  do(broom::tidy(power.t.test(power = .8, 
                              delta =  .$mean_diff,
                              sd =   .$sd_pooled,
                              sig.level = .05,
                              type = "paired",
                              alternative = "two.sided")))                               # determine sample size requirement
knitr::kable(cbind(VasB_table, VasB_power),
    digits = 2)
Conditie mean_pre mean_post mean_diff sd_pooled n_pre n_post n delta sd sig.level power
iubit 75.14 77.29 -2.14 21.37 28 28 782.41 2.14 21.37 0.05 0.8
mama 78.44 78.65 -0.21 17.01 34 34 53603.98 0.21 17.01 0.05 0.8
personalitate 74.00 75.69 -1.69 20.20 36 36 1117.79 1.69 20.20 0.05 0.8
prieten 68.86 74.68 -5.81 17.28 37 37 71.37 5.81 17.28 0.05 0.8
tata 71.14 73.43 -2.29 19.14 35 35 552.39 2.29 19.14 0.05 0.8


5 Session Info

R version 3.5.2 (2018-12-20)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=Romanian_Romania.1250  LC_CTYPE=Romanian_Romania.1250    LC_MONETARY=Romanian_Romania.1250
[4] LC_NUMERIC=C                      LC_TIME=Romanian_Romania.1250    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] bindrcpp_0.2.2    ggpubr_0.2        magrittr_1.5      broom_0.5.1       papaja_0.1.0.9842 psych_1.8.10      forcats_0.3.0    
 [8] stringr_1.3.1     dplyr_0.7.8       purrr_0.2.5       readr_1.3.0       tidyr_0.8.2       tibble_1.4.2      ggplot2_3.1.0    
[15] tidyverse_1.2.1   pacman_0.5.0     

loaded via a namespace (and not attached):
 [1] tidyselect_0.2.5 xfun_0.4         haven_2.1.0      lattice_0.20-38  colorspace_1.3-2 generics_0.0.2   htmltools_0.3.6 
 [8] yaml_2.2.0       rlang_0.3.1      pillar_1.3.1     foreign_0.8-71   glue_1.3.0       withr_2.1.2      modelr_0.1.2    
[15] readxl_1.1.0     bindr_0.1.1      plyr_1.8.4       ggsignif_0.4.0   munsell_0.5.0    gtable_0.2.0     cellranger_1.1.0
[22] rvest_0.3.2      evaluate_0.12    labeling_0.3     knitr_1.21       parallel_3.5.2   highr_0.7        Rcpp_1.0.0      
[29] scales_1.0.0     backports_1.1.3  jsonlite_1.6     mnormt_1.5-5     digest_0.6.18    hms_0.4.2        stringi_1.2.4   
[36] grid_3.5.2       cli_1.0.1        tools_3.5.2      lazyeval_0.2.1   crayon_1.3.4     pkgconfig_2.0.2  xml2_1.2.0      
[43] lubridate_1.7.4  rmarkdown_1.11   assertthat_0.2.0 httr_1.4.0       rstudioapi_0.8   R6_2.3.0         nlme_3.1-137    
[50] compiler_3.5.2  
 

A work by Claudiu Papasteri

claudiu.papasteri@gmail.com

 

LS0tDQp0aXRsZTogIjxicj4gTzFBIFJlcG9ydCIgDQpzdWJ0aXRsZTogIlBvd2VyIEFuYWx5c2lzIg0KYXV0aG9yOiAiPGJyPiBDbGF1ZGl1IFBhcGFzdGVyaSINCmRhdGU6ICJgciBmb3JtYXQoU3lzLnRpbWUoKSwgJyVkICVtICVZJylgIg0Kb3V0cHV0OiANCiAgICBodG1sX25vdGVib29rOg0KICAgICAgICAgICAgY29kZV9mb2xkaW5nOiBoaWRlDQogICAgICAgICAgICB0b2M6IHRydWUNCiAgICAgICAgICAgIHRvY19kZXB0aDogMg0KICAgICAgICAgICAgbnVtYmVyX3NlY3Rpb25zOiB0cnVlDQogICAgICAgICAgICB0aGVtZTogc3BhY2VsYWINCiAgICAgICAgICAgIGhpZ2hsaWdodDogdGFuZ28NCiAgICAgICAgICAgIGZvbnQtZmFtaWx5OiBBcmlhbA0KICAgICAgICAgICAgZmlnX3dpZHRoOiAxMA0KICAgICAgICAgICAgZmlnX2hlaWdodDogOQ0KICAgIHBkZl9kb2N1bWVudDogDQogICAgICAgICAgICB0b2M6IHRydWUNCiAgICAgICAgICAgIHRvY19kZXB0aDogMg0KICAgICAgICAgICAgbnVtYmVyX3NlY3Rpb25zOiB0cnVlDQogICAgICAgICAgICAjIGZvbnRzaXplOiAxMXB0DQogICAgICAgICAgICAjIGdlb21ldHJ5OiBtYXJnaW49MWluDQogICAgICAgICAgICAjIGZpZ193aWR0aDogNw0KICAgICAgICAgICAgIyBmaWdfaGVpZ2h0OiA2DQogICAgICAgICAgICAjIGZpZ19jYXB0aW9uOiB0cnVlDQogICAgIyBnaXRodWJfZG9jdW1lbnQ6IA0KICAgICAgICAgICAgIyB0b2M6IHRydWUNCiAgICAgICAgICAgICMgdG9jX2RlcHRoOiAyDQogICAgICAgICAgICAjIGh0bWxfcHJldmlldzogZmFsc2UNCiAgICAgICAgICAgICMgZmlnX3dpZHRoOiA1DQogICAgICAgICAgICAjIGZpZ19oZWlnaHQ6IDUNCiAgICAgICAgICAgICMgZGV2OiBqcGVnDQotLS0NCg0KDQo8IS0tIFNldHVwIC0tPg0KDQoNCmBgYHtyIHNldHVwLCBpbmNsdWRlID0gRkFMU0V9DQojIGtpbnRyIG9wdGlvbnMNCmtuaXRyOjpvcHRzX2NodW5rJHNldCgNCiAgY29tbWVudCA9ICIjIiwNCiAgY29sbGFwc2UgPSBUUlVFLA0KICBlY2hvID0gVFJVRSwgd2FybmluZyA9IFRSVUUsIG1lc3NhZ2UgPSBUUlVFLCBjYWNoZSA9IFRSVUUgICAgICAgIyBlY2hvID0gRmFsc2UgZm9yI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A0KICAgICAgICAgICAgICAgICAgICAgICAgY29uZi5sZXZlbCA9IDAuOTUpKSkgJT4lDQogIGtuaXRyOjprYWJsZShkaWdpdHMgPSAyKQ0KYGBgDQoNCiMjIFNtYXBsZSBzaXplIChuKSBmb3IgUG93ZXIgPSAuOCwgU2lnIGxldmVsID0gLjA1LCBjb21wdXRlZCBkZWx0YQ0KYGBge3Igc3RhaV90YWJsZX0gDQpzdGFpX3RhYmxlIDwtIA0KRGF0ZSAlPiUgDQogIGdyb3VwX2J5KENvbmRpdGllKSAlPiUgDQogIGRwbHlyOjpzdW1tYXJpemUobWVhbl9wcmUgPSBtZWFuKFN0YWlTX3ByZSwgbmEucm09VFJVRSksDQogICAgICAgICAgICAgICAgICAgbWVhbl9wb3N0ID0gbWVhbihTdGFpU19wb3N0LCBuYS5ybT1UUlVFKSwNCiAgICAgICAgICAgICAgICAgICBtZWFuX2RpZmYgPSBtZWFuKFN0YWlTX3ByZSwgbmEucm09VFJVRSkgLSBtZWFuKFN0YWlTX3Bvc3QsIG5hLnJtPVRSVUUpLCAgICMgbV9wcmUgLSBtX3Bvc3QNCiAgICAgICAgICAgICAgICAgICBzZF9wb29sZWQgPSBzZChjKFN0YWlTX3ByZSwgU3RhaVNfcG9zdCksIG5hLnJtPVRSVUUpLCAgICAgICAgICAgICAgICAgICAgICMgcG9vbGVkIHNkDQogICAgICAgICAgICAgICAgICAgbl9wcmUgPSBzdW0oIWlzLm5hKFN0YWlTX3ByZSkpLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAjIG4gDQogICAgICAgICAgICAgICAgICAgbl9wb3N0ID0gc3VtKCFpcy5uYShTdGFpU19wb3N0KSkpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAjIG4gDQoNCnN0YWlfcG93ZXIgPC0gDQpzdGFpX3RhYmxlICAlPiUgDQogIHJvd3dpc2UoKSAgJT4lDQogIGRvKGJyb29tOjp0aWR5KHBvd2VyLnQudGVzdChwb3dlciA9IC44LCANCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlbHRhID0gIC4kbWVhbl9kaWZmLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2QgPSAgIC4kc2RfcG9vbGVkLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2lnLmxldmVsID0gLjA1LA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZSA9ICJwYWlyZWQiLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWx0ZXJuYXRpdmUgPSAidHdvLnNpZGVkIikpKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIyBkZXRlcm1pbmUgc2FtcGxlIHNpemUgcmVxdWlyZW1lbnQNCiAgDQprbml0cjo6a2FibGUoY2JpbmQoc3RhaV90YWJsZSwgc3RhaV9wb3dlciksDQogICAgZGlnaXRzID0gMikNCmBgYA0KDQoNCjxicj4NCg0KIyBWQVMgU3RyZXMNCg0KIyMgUGxvdHMgd2l0aCBwIHZhbHVlcw0KYGBge3IgdmFzU19wbG90LCBmaWcud2lkdGggPSAxMCwgZmlnLmFzcCA9IDAuOH0NCiMjIFZhcyBTdHJlcyBwbG90IA0KVmFzc3RyZXNtZWx0IDwtIERhdGVbLCBjKCJJRCIsICJDb25kaXRpZSIsICJWYXNfc3RyZXNfcHJlIiwiVmFzX3N0cmVzX3Bvc3QiKV0gJT4lIA0KICBnYXRoZXIoIlZhc19zdHJlc19wcmUiLCJWYXNfc3RyZXNfcG9zdCIsIGtleSA9ICJWYXNfc3RyZXNfY29uZCIsIHZhbHVlID0gInZhbHVlIikgJT4lIA0KICBtdXRhdGVfYXQodmFycyhjKDEsMiwzKSksIGZ1bnMoYXMuZmFjdG9yKSkgJT4lIA0KICBtdXRhdGVfYXQodmFycyhjKDQpKSwgZnVucyhhcy5udW1lcmljKSkgJT4lIA0KICBtdXRhdGUoVmFzX3N0cmVzX2NvbmQgPSBmYWN0b3IoVmFzX3N0c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SAlPiUgDQogIGdyb3VwX2J5KENvbmRpdGllKSAlPiUgDQogIGRwbHlyOjpzdW1tYXJpemUobWVhbl9wcmUgPSBtZWFuKFZhc19zdHJlc19wcmUsIG5hLnJtPVRSVUUpLA0KICAgICAgICAgICAgICAgICAgIG1lYW5fcG9zdCA9IG1lYW4oVmFzX3N0cmVzX3Bvc3QsIG5hLnJtPVRSVUUpLA0KICAgICAgICAgICAgICAgICAgIG1lYW5fZGlmZiA9IG1lYW4oVmFzX3N0cmVzX3ByZSwgbmEucm09VFJVRSkgLSBtZWFuKFZhc19zdHJlc19wb3N0LCBuYS5ybT1UUlVFKSwgICAjIG1fcHJlIC0gbV9wb3N0DQogICAgICAgICAgICAgICAgICAgc2RfcG9vbGVkID0gc2QoYyhWYXNfc3RyZXNfcHJlLCBWYXNfc3RyZXNfcG9zdCksIG5hLnJtPVRSVUUpLCAgICAgICAgICAgICAgICAgICAgICMgcG9vbGVkIHNkDQogICAgICAgICAgICAgICAgICAgbl9wcmUgPSBzdW0oIWlzLm5hKFZhc19zdHJlc19wcmUpKSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIyBuIA0KICAgICAgICAgICAgICAgICAgIG5fcG9zdCA9IHN1bSghaXMubmEoVmFzX3N0cmVzX3Bvc3QpKSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIyBuIA0KDQoNCg0KVmFzU19wb3dlciA8LSANClZhc1NfdGFibGUgICU+JSAgDQogIHJvd3dpc2UoKSAgJT4lICAgICAgICAgICAgICAgICAgIA0KICBkbyhicm9vbTo6dGlkeShwb3dlci50LnRlc3QocG93ZXIgPSAuOCwgDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWx0YSA9ICAuJG1lYW5fZGlmZiwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNkID0gICAuJHNkX3Bvb2xlZCwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpZy5sZXZlb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gICAgICAgICAgbWVhbl9kaWZmID0gbWVhbihWYXNfYmluZV9wcmUsIG5hLnJtPVRSVUUpIC0gbWVhbihWYXNfYmluZV9wb3N0LCBuYS5ybT1UUlVFKSwgICAjIG1fcHJlIC0gbV9wb3N0DQogICAgICAgICAgICAgICAgICAgc2RfcG9vbGVkID0gc2QoYyhWYXNfYmluZV9wcmUsIFZhc19iaW5lX3Bvc3QpLCBuYS5ybT1UUlVFKSwgICAgICAgICAgICAgICAgICAgICAjIHBvb2xlZCBzZA0KICAgICAgICAgICAgICAgICAgIG5fcHJlID0gc3VtKCFpcy5uYShWYXNfYmluZV9wcmUpKSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIyBuIA0KICAgICAgICAgICAgICAgICAgIG5fcG9zdCA9IHN1bSghaXMubmEoVmFzX2JpbmVfcG9zdCkpKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAjIG4gDQoNClZhc0JfcG93ZXIgPC0NClZhc0JfdGFibGUgICU+JSAgDQogIHJvd3dpc2UoKSAgJT4lICAgICAgICAgICAgICAgICAgIA0KICBkbyhicm9vbTo6dGlkeShwb3dlci50LnRlc3QocG93ZXIgPSAuOCwgDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWx0YSA9ICAuJG1lYW5fZGlmZiwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNkID0gICAuJHNkX3Bvb2xlZCwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpZy5sZXZlbCA9IC4wNSwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGUgPSAicGFpcmVkIiwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsdGVybmF0aXZlID0gInR3by5zaWRlZCIpKSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIyBkZXRlcm1pbmUgc2FtcGxlIHNpemUgcmVxdWlyZW1lbnQNCg0Ka25pdHI6OmthYmxlKGNia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