Change filtering of Finished and remove subject that was not in wave 1 from data

This commit is contained in:
2025-12-10 16:18:06 +01:00
parent 00ae79b876
commit bbdb35559c
8 changed files with 4329 additions and 4324 deletions
+4
View File
@@ -32,6 +32,10 @@ dat3[dat3$subj_id == names(which(table(dat3$subj_id) > 1)),
dat1 <- subset(dat1, !duplicated(dat1$subj_id))
dat3 <- subset(dat3, !duplicated(dat3$subj_id))
# Remove subject that suddenly emerged in wave 3 (which should not be possible,
# since only participants from wave 1 were invited for participation)
dat3 <- subset(dat3, subj_id != "subj1009")
# Remove empty variables wave 1
which(apply(dat1, 2, function(x) is.na(x) |> sum()) == nrow(dat1)) |> names()
dat1 <- subset(dat1, select = !grepl("^Q1.*", names(dat1)))