### merge all data setsquestionnaire <-left_join(x = questionnaire_preCAM, y = questionnaire_postCAM, by='PROLIFIC_PID') %>%left_join(., questionnaire_secondPostCAM, by='PROLIFIC_PID') questionnaire$ID.x <-NULLquestionnaire$ID.y <-NULLdim(questionnaire)
[1] 227 60
# change name of ans1names(questionnaire)[names(questionnaire) =="ans1"] <-"adaptiveQuestion"# remove testing data setsquestionnaire <- questionnaire[nchar(questionnaire$PROLIFIC_PID) ==24,]### add prolific dataprolific <- prolific[prolific$Participant.id %in% questionnaire$PROLIFIC_PID,]prolific <- prolific %>%arrange(sapply(Participant.id, function(y) which(y == questionnaire$PROLIFIC_PID)))if(nrow(prolific) ==nrow(questionnaire)){print("prolific data sucessfully added") questionnaire$socio_age <- prolific$Age questionnaire$socio_sex <- prolific$Sex questionnaire$socio_ethnicity <- prolific$Ethnicity.simplified questionnaire$socio_student <- prolific$Student.status questionnaire$socio_employment <- prolific$Employment.status questionnaire$total_min_prolific <- prolific$Time.taken /60## all time outs to NA questionnaire$total_min_prolific[questionnaire$total_min_prolific >1000] <-NA## all expired data to NA questionnaire[questionnaire =="DATA_EXPIRED"] <-NA questionnaire$socio_age <-as.numeric(questionnaire$socio_age)}
[1] "prolific data sucessfully added"
## all missing answers to NAquestionnaire[questionnaire ==""] <-NA## all feedback smaller than 3 characters to NAquestionnaire$feedback_critic[nchar(questionnaire$feedback_critic) <=2] <-NA### save files## save as .xlsx filexlsx::write.xlsx2(x = questionnaire, file ="questionnaire.xlsx")## save as R objectsaveRDS(questionnaire, file ="questionnaire.rds")
get reaction times for single components
Plot time taken (in minutes) by participants for single components of study:
## save ggplot as PDFggsave(filename ="outputs/01_dataPreperation/durations_components.pdf", p)# Calculate the mean duration in seconds for each sender and sort by mean durationtmp <- dat_duration %>%group_by(sender) %>%summarise(N =n(), mean_duration =mean(duration, na.rm =TRUE)) %>%arrange(desc(mean_duration))DT::datatable(tmp, options =list(pageLength =5))
set up CAM data
pre
Load CAM data
setwd("outputs/01_dataPreperation")suppressMessages(read_file("CAMdata.txt") %>%# ... split it into lines ...str_split('\n') %>%first() %>%discard(function(x) x =='') %>%discard(function(x) x =='\r') %>%# ... filter empty rows ...discard(function(x) x =='')) -> dat_CAM_preraw_CAM_pre <-list()for(i in1:length(dat_CAM_pre)){ raw_CAM_pre[[i]] <- jsonlite::fromJSON(txt = dat_CAM_pre[[i]])}
Create CAM files, draw CAMs and compute network indicators
[1] "create_wordlist - use raw words"
[1] 0
[1] 3076
[1] "temporarily suffixes are added, because not all words have been summarized"
processing 225 CAMs...
[1] "== participantCAM in drawnCAM"
save_CAMs_as_pictures =FALSEif(save_CAMs_as_pictures){setwd("outputs/01_dataPreperation")setwd("savedCAMs_pre")setwd("png")### remove all files if there are anyif(length(list.files()) >=1){file.remove(list.files())cat('\n! all former .png files have been deleted')}### if no participant ID was provided replace by randomly generated CAM IDif(all(CAMfiles_pre[[3]]$participantCAM.x =="noID")){ CAMfiles_pre[[3]]$participantCAM.x <- CAMfiles_pre[[3]]$CAM.x}### save as .json files, and as .png (igraph)ids_CAMs <-unique(CAMfiles_pre[[3]]$participantCAM.x); length(ids_CAMs)for(i in1:length(ids_CAMs)){save_graphic(filename =paste0("CAM", "_t1_", ids_CAMs[i])) # paste0(ids_CAMs[i])) CAM_igraph <- CAMdrawn_pre[[c(1:length(CAMdrawn_pre))[names(CAMdrawn_pre) ==paste0(unique(CAMfiles_pre[[3]]$participantCAM.x)[i])]]]plot(CAM_igraph, edge.arrow.size = .7,layout=layout_nicely, vertex.frame.color="black", asp = .5, margin =-0.1,vertex.size =10, vertex.label.cex = .9)dev.off()}setwd("../json")### remove all files if there are anyif(length(list.files()) >=1){file.remove(list.files())cat('\n! all former .json files have been deleted')}for(i in1:length(raw_CAM_pre)){if(!is_empty(raw_CAM_pre[[i]]$nodes)){if(nrow(raw_CAM_pre[[i]]$nodes) >5){write(toJSON(raw_CAM_pre[[i]], encoding ="UTF-8"),paste0(raw_CAM_pre[[i]]$creator, ".json")) } }}}
post
Load CAM data
setwd("outputs/01_dataPreperation")suppressMessages(read_file("secondCAMdata.txt") %>%# ... split it into lines ...str_split('\n') %>%first() %>%discard(function(x) x =='') %>%discard(function(x) x =='\r') %>%# ... filter empty rows ...discard(function(x) x =='')) -> dat_CAM_postraw_CAM_post <-list()for(i in1:length(dat_CAM_post)){ raw_CAM_post[[i]] <- jsonlite::fromJSON(txt = dat_CAM_post[[i]])}
Create CAM files, draw CAMs and compute network indicators
[1] "create_wordlist - use raw words"
[1] 0
[1] 3532
[1] "temporarily suffixes are added, because not all words have been summarized"
processing 225 CAMs...
[1] "== participantCAM in drawnCAM"
save_CAMs_as_pictures =FALSEif(save_CAMs_as_pictures){setwd("outputs/01_dataPreperation")setwd("savedCAMs_post")setwd("png")### remove all files if there are anyif(length(list.files()) >=1){file.remove(list.files())cat('\n! all former .png files have been deleted')}### if no participant ID was provided replace by randomly generated CAM IDif(all(CAMfiles_post[[3]]$participantCAM.x =="noID")){ CAMfiles_post[[3]]$participantCAM.x <- CAMfiles_post[[3]]$CAM.x}### save as .json files, and as .png (igraph)ids_CAMs <-unique(CAMfiles_post[[3]]$participantCAM.x); length(ids_CAMs)for(i in1:length(ids_CAMs)){save_graphic(filename =paste0("CAM", "_t2_", ids_CAMs[i])) # paste0(ids_CAMs[i])) CAM_igraph <- CAMdrawn_post[[c(1:length(CAMdrawn_post))[names(CAMdrawn_post) ==paste0(unique(CAMfiles_post[[3]]$participantCAM.x)[i])]]]plot(CAM_igraph, edge.arrow.size = .7,layout=layout_nicely, vertex.frame.color="black", asp = .5, margin =-0.1,vertex.size =10, vertex.label.cex = .9)dev.off()}setwd("../json")### remove all files if there are anyif(length(list.files()) >=1){file.remove(list.files())cat('\n! all former .json files have been deleted')}for(i in1:length(raw_CAM_post)){if(!is_empty(raw_CAM_post[[i]]$nodes)){if(nrow(raw_CAM_post[[i]]$nodes) >5){write(toJSON(raw_CAM_post[[i]], encoding ="UTF-8"),paste0(raw_CAM_post[[i]]$creator, ".json")) } }}}
identify types of changes (delta CAM)
### set A, B, C, D types# !!! i = 215if (all(unique(CAMfiles_pre[[1]]$participantCAM) ==unique(CAMfiles_post[[1]]$participantCAM))) { vec_type <-c() error <-0 verbose =FALSE## list_newWords_text <-list() list_newWords_value <-list() list_ids <-list() h =1for (i in1:length(unique(CAMfiles_pre[[1]]$participantCAM))) { praeCAM <- CAMfiles_pre[[1]][CAMfiles_pre[[1]]$participantCAM ==unique(CAMfiles_pre[[1]]$participantCAM)[i],] postCAM <- CAMfiles_post[[1]][CAMfiles_post[[1]]$participantCAM ==unique(CAMfiles_post[[1]]$participantCAM)[i],]## to test:# praeCAM$text %in% postCAM$text# postCAM$text %in% praeCAM$text# length(praeCAM$text)# length(postCAM$text)# praeCAM$text# postCAM$text## Typ Aif (all(postCAM$text %in% praeCAM$text) &length(postCAM$text) <length(praeCAM$text)) { vec_type[i] <-"A"if (verbose) {cat("\n i:", i, "type:", vec_type[i], "\n") } error = error +1 }## Typ Bif (all(praeCAM$text %in% postCAM$text) &length(postCAM$text) >length(praeCAM$text)) { vec_type[i] <-"B"if (verbose) {cat("\n i:", i, "type:", vec_type[i], "\n") } error = error +1## get words and values list_newWords_text[[h]] <- postCAM$text[!postCAM$text %in% praeCAM$text] list_newWords_value[[h]] <- postCAM$value[!postCAM$text %in% praeCAM$text] list_ids[[h]] <- postCAM$id[!postCAM$text %in% praeCAM$text] h = h +1 }## Typ Cif (all(praeCAM$text %in% postCAM$text) &all(postCAM$text %in% praeCAM$text)) { vec_type[i] <-"C"if (verbose) {cat("\n i:", i, "type:", vec_type[i], "\n") } error = error +1 }## Typ D# smaller > pr? UE post, post UE pr?if (sum(praeCAM$text %in% postCAM$text) <length(praeCAM$text) &sum(postCAM$text %in% praeCAM$text) <length(postCAM$text)) { vec_type[i] <-"D"if (verbose) {cat("\n i:", i, "type:", vec_type[i], "\n") } error = error +1 }if (error >1) {print("ERROR in (not exclusive logical condition)", i)stop("check your data and adjust this function") } error =0 }}table(vec_type)
time 2024-01-30 09:05:58.107549 at index 1 for approximate matching
time 2024-01-30 09:06:07.285121 at index 2 for approximate matching
time 2024-01-30 09:06:08.861007 at index 3 for approximate matching
time 2024-01-30 09:06:11.532449 at index 4 for approximate matching
time 2024-01-30 09:06:15.449462 at index 5 for approximate matching
time 2024-01-30 09:06:32.09116 at index 6 for approximate matching
time 2024-01-30 09:08:20.401772 at index 7 for approximate matching
time 2024-01-30 09:08:27.05376 at index 8 for approximate matching
time 2024-01-30 09:08:35.309873 at index 9 for approximate matching
time 2024-01-30 09:08:42.188456 at index 10 for approximate matching
time 2024-01-30 09:08:47.489243 at index 11 for approximate matching
time 2024-01-30 09:08:51.822573 at index 12 for approximate matching
time 2024-01-30 09:09:00.892489 at index 13 for approximate matching
time 2024-01-30 09:09:17.238047 at index 14 for approximate matching
time 2024-01-30 09:09:23.696046 at index 15 for approximate matching
time 2024-01-30 09:09:28.551117 at index 16 for approximate matching
time 2024-01-30 09:09:30.878831 at index 17 for approximate matching
time 2024-01-30 09:09:46.034248 at index 18 for approximate matching
time 2024-01-30 09:09:51.244462 at index 19 for approximate matching
time 2024-01-30 09:09:54.806778 at index 20 for approximate matching
time 2024-01-30 09:09:59.077254 at index 21 for approximate matching
time 2024-01-30 09:10:04.964584 at index 22 for approximate matching
time 2024-01-30 09:10:12.817818 at index 23 for approximate matching
time 2024-01-30 09:10:18.892842 at index 24 for approximate matching
time 2024-01-30 09:10:33.218676 at index 25 for approximate matching
time 2024-01-30 09:10:39.654777 at index 26 for approximate matching
time 2024-01-30 09:10:54.024783 at index 27 for approximate matching
time 2024-01-30 09:11:00.825529 at index 28 for approximate matching
time 2024-01-30 09:11:04.267163 at index 29 for approximate matching
time 2024-01-30 09:11:36.265956 at index 30 for approximate matching
time 2024-01-30 09:11:39.41114 at index 31 for approximate matching
time 2024-01-30 09:11:50.33368 at index 32 for approximate matching
time 2024-01-30 09:11:53.968456 at index 33 for approximate matching
time 2024-01-30 09:11:59.210091 at index 34 for approximate matching
time 2024-01-30 09:12:03.340299 at index 35 for approximate matching
time 2024-01-30 09:12:29.403103 at index 36 for approximate matching
time 2024-01-30 09:12:31.799614 at index 37 for approximate matching
time 2024-01-30 09:12:45.38969 at index 38 for approximate matching
time 2024-01-30 09:12:53.483914 at index 39 for approximate matching
time 2024-01-30 09:13:00.619616 at index 40 for approximate matching
time 2024-01-30 09:13:06.135471 at index 41 for approximate matching
time 2024-01-30 09:13:12.689052 at index 42 for approximate matching
time 2024-01-30 09:13:18.423744 at index 43 for approximate matching
time 2024-01-30 09:13:23.440615 at index 44 for approximate matching
time 2024-01-30 09:13:26.321477 at index 45 for approximate matching
time 2024-01-30 09:13:47.933281 at index 46 for approximate matching
time 2024-01-30 09:14:06.774211 at index 47 for approximate matching
time 2024-01-30 09:14:10.866974 at index 48 for approximate matching
time 2024-01-30 09:14:19.423517 at index 49 for approximate matching
time 2024-01-30 09:14:25.307824 at index 50 for approximate matching
time 2024-01-30 09:14:29.830818 at index 51 for approximate matching
time 2024-01-30 09:14:34.904091 at index 52 for approximate matching
time 2024-01-30 09:14:55.63685 at index 53 for approximate matching
time 2024-01-30 09:15:01.543675 at index 54 for approximate matching
time 2024-01-30 09:15:05.271876 at index 55 for approximate matching
time 2024-01-30 09:15:08.630882 at index 56 for approximate matching
time 2024-01-30 09:15:30.889735 at index 57 for approximate matching
time 2024-01-30 09:15:34.888144 at index 58 for approximate matching
time 2024-01-30 09:15:40.339594 at index 59 for approximate matching
time 2024-01-30 09:16:05.176845 at index 60 for approximate matching
time 2024-01-30 09:16:09.576636 at index 61 for approximate matching
time 2024-01-30 09:16:41.886149 at index 62 for approximate matching
time 2024-01-30 09:16:46.646111 at index 63 for approximate matching
time 2024-01-30 09:16:52.565343 at index 64 for approximate matching
time 2024-01-30 09:16:54.94748 at index 65 for approximate matching
time 2024-01-30 09:17:00.484807 at index 66 for approximate matching
time 2024-01-30 09:17:02.847554 at index 67 for approximate matching
time 2024-01-30 09:17:18.055018 at index 68 for approximate matching
time 2024-01-30 09:17:21.680035 at index 69 for approximate matching
time 2024-01-30 09:17:39.020315 at index 70 for approximate matching
time 2024-01-30 09:17:44.665456 at index 71 for approximate matching
time 2024-01-30 09:17:51.654347 at index 72 for approximate matching
time 2024-01-30 09:17:55.523829 at index 73 for approximate matching
time 2024-01-30 09:18:12.26924 at index 74 for approximate matching
time 2024-01-30 09:18:21.347903 at index 75 for approximate matching
time 2024-01-30 09:18:55.09138 at index 76 for approximate matching
time 2024-01-30 09:19:17.496681 at index 77 for approximate matching
time 2024-01-30 09:19:20.491197 at index 78 for approximate matching
time 2024-01-30 09:20:04.054224 at index 79 for approximate matching
time 2024-01-30 09:20:06.206856 at index 80 for approximate matching
time 2024-01-30 09:20:28.620212 at index 81 for approximate matching
time 2024-01-30 09:20:39.01334 at index 82 for approximate matching
time 2024-01-30 09:20:42.008472 at index 83 for approximate matching
time 2024-01-30 09:21:13.035549 at index 84 for approximate matching
time 2024-01-30 09:21:16.407575 at index 85 for approximate matching
time 2024-01-30 09:21:23.054959 at index 86 for approximate matching
time 2024-01-30 09:21:30.196167 at index 87 for approximate matching
time 2024-01-30 09:21:33.903075 at index 88 for approximate matching
time 2024-01-30 09:21:38.166652 at index 89 for approximate matching
time 2024-01-30 09:21:56.020483 at index 90 for approximate matching
time 2024-01-30 09:22:14.362535 at index 91 for approximate matching
time 2024-01-30 09:22:34.054561 at index 92 for approximate matching
time 2024-01-30 09:22:41.423701 at index 93 for approximate matching
time 2024-01-30 09:22:44.405934 at index 94 for approximate matching
time 2024-01-30 09:22:55.906814 at index 95 for approximate matching
time 2024-01-30 09:23:00.293414 at index 96 for approximate matching
time 2024-01-30 09:23:12.882126 at index 97 for approximate matching
time 2024-01-30 09:23:24.278825 at index 98 for approximate matching
time 2024-01-30 09:23:28.249727 at index 99 for approximate matching
time 2024-01-30 09:23:34.173073 at index 100 for approximate matching
time 2024-01-30 09:23:38.899285 at index 101 for approximate matching
time 2024-01-30 09:23:42.72488 at index 102 for approximate matching
time 2024-01-30 09:23:45.054003 at index 103 for approximate matching
time 2024-01-30 09:23:53.555377 at index 104 for approximate matching
time 2024-01-30 09:24:02.102295 at index 105 for approximate matching
time 2024-01-30 09:24:04.524137 at index 106 for approximate matching
time 2024-01-30 09:24:19.071782 at index 107 for approximate matching
time 2024-01-30 09:24:38.843123 at index 108 for approximate matching
time 2024-01-30 09:24:42.471636 at index 109 for approximate matching
time 2024-01-30 09:24:45.647624 at index 110 for approximate matching
time 2024-01-30 09:25:06.29956 at index 111 for approximate matching
time 2024-01-30 09:25:10.847232 at index 112 for approximate matching
time 2024-01-30 09:25:16.137951 at index 113 for approximate matching
time 2024-01-30 09:25:19.394353 at index 114 for approximate matching
time 2024-01-30 09:25:23.426698 at index 115 for approximate matching
time 2024-01-30 09:25:30.176009 at index 116 for approximate matching
time 2024-01-30 09:25:35.42967 at index 117 for approximate matching
time 2024-01-30 09:25:44.521288 at index 118 for approximate matching
time 2024-01-30 09:26:04.928644 at index 119 for approximate matching
time 2024-01-30 09:26:07.640153 at index 120 for approximate matching
time 2024-01-30 09:26:39.113532 at index 121 for approximate matching
time 2024-01-30 09:26:59.191921 at index 122 for approximate matching
time 2024-01-30 09:27:02.659192 at index 123 for approximate matching
time 2024-01-30 09:27:06.096431 at index 124 for approximate matching
time 2024-01-30 09:27:10.699471 at index 125 for approximate matching
time 2024-01-30 09:27:15.440025 at index 126 for approximate matching
time 2024-01-30 09:27:33.618857 at index 127 for approximate matching
time 2024-01-30 09:27:41.595474 at index 128 for approximate matching
time 2024-01-30 09:28:24.765775 at index 129 for approximate matching
time 2024-01-30 09:28:30.214952 at index 130 for approximate matching
time 2024-01-30 09:28:34.007822 at index 131 for approximate matching
time 2024-01-30 09:28:37.828649 at index 132 for approximate matching
time 2024-01-30 09:28:46.689435 at index 133 for approximate matching
time 2024-01-30 09:29:02.261669 at index 134 for approximate matching
time 2024-01-30 09:29:26.638285 at index 135 for approximate matching
time 2024-01-30 09:29:29.919472 at index 136 for approximate matching
time 2024-01-30 09:29:32.821631 at index 137 for approximate matching
time 2024-01-30 09:29:36.957035 at index 138 for approximate matching
time 2024-01-30 09:29:42.108839 at index 139 for approximate matching
time 2024-01-30 09:29:46.987462 at index 140 for approximate matching
time 2024-01-30 09:29:56.220139 at index 141 for approximate matching
time 2024-01-30 09:30:03.462438 at index 142 for approximate matching
time 2024-01-30 09:30:08.555759 at index 143 for approximate matching
time 2024-01-30 09:30:14.225816 at index 144 for approximate matching
time 2024-01-30 09:30:19.491435 at index 145 for approximate matching
time 2024-01-30 09:30:26.172877 at index 146 for approximate matching
time 2024-01-30 09:30:39.226614 at index 147 for approximate matching
time 2024-01-30 09:30:44.821054 at index 148 for approximate matching
time 2024-01-30 09:31:16.631706 at index 149 for approximate matching
time 2024-01-30 09:31:28.517348 at index 150 for approximate matching
time 2024-01-30 09:31:37.940384 at index 151 for approximate matching
time 2024-01-30 09:31:58.848891 at index 152 for approximate matching
time 2024-01-30 09:32:04.239705 at index 153 for approximate matching
time 2024-01-30 09:32:09.067416 at index 154 for approximate matching
time 2024-01-30 09:32:14.572809 at index 155 for approximate matching
time 2024-01-30 09:32:21.388538 at index 156 for approximate matching
time 2024-01-30 09:32:26.770836 at index 157 for approximate matching
time 2024-01-30 09:32:34.250764 at index 158 for approximate matching
time 2024-01-30 09:32:45.077212 at index 159 for approximate matching
time 2024-01-30 09:33:07.491493 at index 160 for approximate matching
time 2024-01-30 09:33:51.180969 at index 161 for approximate matching
time 2024-01-30 09:33:59.523487 at index 162 for approximate matching
time 2024-01-30 09:34:35.512881 at index 163 for approximate matching
time 2024-01-30 09:35:21.584897 at index 164 for approximate matching
time 2024-01-30 09:35:25.321651 at index 165 for approximate matching
time 2024-01-30 09:47:53.502211 at index 166 for approximate matching
time 2024-01-30 09:47:53.621005 at index 167 for approximate matching
time 2024-01-30 09:51:29.615021 at index 168 for approximate matching
time 2024-01-30 13:28:20.871211 at index 169 for approximate matching
time 2024-01-30 13:28:23.199671 at index 170 for approximate matching
time 2024-01-30 13:28:26.858094 at index 171 for approximate matching
time 2024-01-30 13:28:28.519124 at index 172 for approximate matching
time 2024-01-30 13:28:44.767435 at index 173 for approximate matching
time 2024-01-30 13:28:47.649923 at index 174 for approximate matching
time 2024-01-30 13:36:26.956501 at index 175 for approximate matching
time 2024-01-30 13:37:01.973651 at index 176 for approximate matching
time 2024-01-30 13:37:04.591347 at index 177 for approximate matching
time 2024-01-30 13:37:07.453839 at index 178 for approximate matching
time 2024-01-30 13:37:59.73067 at index 179 for approximate matching
time 2024-01-30 13:38:05.017236 at index 180 for approximate matching
time 2024-01-30 13:42:01.204679 at index 181 for approximate matching
time 2024-01-30 13:42:04.522289 at index 182 for approximate matching
time 2024-01-30 13:42:44.488391 at index 183 for approximate matching
time 2024-01-30 13:42:51.206836 at index 184 for approximate matching
time 2024-01-30 13:43:36.574948 at index 185 for approximate matching
time 2024-01-30 13:43:48.33995 at index 186 for approximate matching
time 2024-01-30 13:44:28.426627 at index 187 for approximate matching
time 2024-01-30 13:45:00.68932 at index 188 for approximate matching
time 2024-01-30 13:45:20.608074 at index 189 for approximate matching
time 2024-01-30 13:45:24.031498 at index 190 for approximate matching
time 2024-01-30 13:45:43.423412 at index 191 for approximate matching
time 2024-01-30 13:45:52.707975 at index 192 for approximate matching
time 2024-01-30 13:46:04.004197 at index 193 for approximate matching
time 2024-01-30 13:46:55.407903 at index 194 for approximate matching
time 2024-01-30 13:47:19.84506 at index 195 for approximate matching
time 2024-01-30 13:47:44.753757 at index 196 for approximate matching
time 2024-01-30 13:47:50.908477 at index 197 for approximate matching
time 2024-01-30 13:48:02.830776 at index 198 for approximate matching
time 2024-01-30 13:48:52.323579 at index 199 for approximate matching
time 2024-01-30 13:49:35.823219 at index 200 for approximate matching
time 2024-01-30 13:49:44.441329 at index 201 for approximate matching
time 2024-01-30 13:49:53.294003 at index 202 for approximate matching
time 2024-01-30 13:50:00.99219 at index 203 for approximate matching
time 2024-01-30 13:50:59.603872 at index 204 for approximate matching
time 2024-01-30 13:51:32.455928 at index 205 for approximate matching
time 2024-01-30 13:51:38.07243 at index 206 for approximate matching
time 2024-01-30 13:52:38.471767 at index 207 for approximate matching
time 2024-01-30 13:52:43.237143 at index 208 for approximate matching
time 2024-01-30 13:53:00.755622 at index 209 for approximate matching
time 2024-01-30 13:53:07.622336 at index 210 for approximate matching
time 2024-02-27 13:37:55.659747 at index 211 for approximate matching
time 2024-02-27 13:38:21.642549 at index 212 for approximate matching
time 2024-02-27 13:38:37.514668 at index 213 for approximate matching
time 2024-03-04 13:05:19.929423 at index 214 for word2vec
time 2024-03-04 13:05:30.380306 at index 215 for word2vec
time 2024-03-04 13:05:42.359073 at index 216 for word2vec
time 2024-03-04 13:06:03.26461 at index 217 for word2vec
time 2024-03-04 13:06:07.566388 at index 218 for word2vec
time 2024-03-04 13:06:24.270221 at index 219 for word2vec
time 2024-03-04 13:06:35.428351 at index 220 for word2vec
time 2024-03-04 13:06:50.153841 at index 221 for word2vec
time 2024-03-04 13:07:20.851714 at index 222 for word2vec
time 2024-03-04 13:07:28.042548 at index 223 for word2vec
time 2024-03-04 13:08:03.706303 at index 224 for word2vec
time 2024-03-04 13:08:07.443088 at index 225 for word2vec
time 2024-03-04 13:08:27.344692 at index 226 for word2vec
time 2024-03-04 13:09:03.163585 at index 227 for word2vec
time 2024-03-04 13:09:08.440557 at index 228 for word2vec
time 2024-03-04 13:09:19.779757 at index 229 for word2vec
time 2024-03-04 13:09:45.662595 at index 230 for word2vec
time 2024-03-04 13:10:54.121394 at index 231 for word2vec
time 2024-03-04 13:11:02.622483 at index 232 for word2vec
time 2024-03-04 13:11:54.581963 at index 233 for word2vec
time 2024-03-04 13:12:14.589523 at index 234 for word2vec
time 2024-03-04 13:12:22.68198 at index 235 for word2vec
time 2024-03-04 13:13:03.998144 at index 236 for word2vec
time 2024-03-04 13:13:19.255176 at index 237 for word2vec
time 2024-03-04 13:13:50.795809 at index 238 for word2vec
time 2024-03-04 13:14:02.910107 at index 239 for word2vec
time 2024-03-04 13:14:40.462864 at index 240 for word2vec
time 2024-03-04 13:14:45.523555 at index 241 for word2vec
time 2024-03-04 13:14:53.85662 at index 242 for word2vec
time 2024-03-04 13:14:58.878649 at index 243 for word2vec
time 2024-03-04 13:15:14.723198 at index 244 for word2vec
time 2024-03-04 13:15:29.332406 at index 245 for word2vec
time 2024-03-04 13:15:40.397531 at index 246 for word2vec
time 2024-03-04 13:15:55.861239 at index 247 for word2vec
time 2024-03-04 13:16:00.240809 at index 248 for word2vec
vec_CAMs <-c(); h =1for(c inunique(CAMfiles_combined[[1]]$CAM)){ tmp <- CAMfiles_combined[[1]][CAMfiles_combined[[1]]$CAM %in% c,]if(!(any(c("Rettungsroboter", "sozialer Assistenzroboter") %in% tmp$text) &all(c("Vorteile", "Nachteile") %in% tmp$text))){print(c)print(tmp$text) vec_CAMs[h] <- c h = h +1# plot(CAMdrawn_combined[[c]]) }}
[1] "create_wordlist - use summarized words"
[1] 2485
[1] 6404
[1] "temporarily suffixes are added, because not all words have been summarized"
processing 432 CAMs...
[1] "== ids_CAMs in drawnCAM"
setwd("outputs/01_dataPreperation/final")### remove all previously removed participantslength(unique(CAMfiles_combined[[1]]$participantCAM))
[1] 216
nrow(networkIndicators_pre)
[1] 225
nrow(networkIndicators_post)
[1] 225
nrow(questionnaire)
[1] 216
networkIndicators_pre <- networkIndicators_pre[networkIndicators_pre$participantCAM %in% CAMfiles_combined[[1]]$participantCAM,]networkIndicators_post <- networkIndicators_post[networkIndicators_post$participantCAM %in% CAMfiles_combined[[1]]$participantCAM,]networkIndicators_post <- networkIndicators_post[networkIndicators_post$participantCAM %in% CAMfiles_combined[[1]]$participantCAM,]### match dataif (all(questionnaire$PROLIFIC_PID == networkIndicators_pre$participantCAM) &all(networkIndicators_pre$participantCAM == networkIndicators_post$participantCAM) &all(unique(CAMfiles_combined[[1]]$participantCAM) == networkIndicators_post$participantCAM)) {print("all data can be matched row by row")# save questionnaire questionnaire$CAMpre <- networkIndicators_pre$CAM_ID questionnaire$CAMpost <- networkIndicators_post$CAM_ID## save as .xlsx file xlsx::write.xlsx2(x = questionnaire, file ="questionnaire_final.xlsx")## save as R objectsaveRDS(questionnaire, file ="questionnaire_final.rds")# save network indicators pre## save as .xlsx file xlsx::write.xlsx2(x = networkIndicators_pre, file ="networkIndicators_pre_final.xlsx")## save as R objectsaveRDS(networkIndicators_pre, file ="networkIndicators_pre_final.rds")# save network indicators post## save as .xlsx file xlsx::write.xlsx2(x = networkIndicators_post, file ="networkIndicators_post_final.xlsx")## save as R objectsaveRDS(networkIndicators_post, file ="networkIndicators_post_final.rds")# save CAMfiles presaveRDS(CAMfiles_pre, file ="CAMfiles_pre_final.rds")# save CAMfiles postsaveRDS(CAMfiles_post, file ="CAMfiles_post_final.rds")# save CAMfiles combined and cleansaveRDS(CAMfiles_combined, file ="CAMfiles_combined_final.rds")# save questionnaire combined with CAMscolnames(networkIndicators_pre) <-paste0(colnames(networkIndicators_pre), "_pre")colnames(networkIndicators_post) <-paste0(colnames(networkIndicators_post), "_post") questionnaireCAMs <-cbind(questionnaire, networkIndicators_pre, networkIndicators_post)## save as .xlsx file xlsx::write.xlsx2(x = questionnaireCAMs, file ="questionnaireCAMs_final.xlsx")## save as R objectsaveRDS(questionnaireCAMs, file ="questionnaireCAMs_final.rds")}