Some script cleaning

This commit is contained in:
Nora Wickelmaier 2024-02-13 09:03:35 +01:00
parent d78a224851
commit 3b518a553a
4 changed files with 8 additions and 8 deletions

View File

@ -1,4 +1,4 @@
# 01_preprocessing_haum.R
# 01_preprocessing.R
#
# content: (1) Parse raw log files
# (2) Create event logs

View File

@ -1,4 +1,4 @@
# 00_current_analysis.R
# 02_descriptives.R
#
# content: (1) Read data
# (2) Descriptives

View File

@ -1,4 +1,4 @@
# 05_item-clustering.R
# 08_item-clustering.R
#
# content: (1) Read data
# (1.1) Read log event data

View File

@ -29,6 +29,7 @@ dat0 <- read.table("results/haum/event_logfiles_2024-01-18_09-58-52.csv",
"character", rep("numeric", 11),
"character", "character"),
sep = ";", header = TRUE)
dat0$event <- factor(dat0$event, levels = c("move", "flipCard", "openTopic",
"openPopup"))
@ -55,11 +56,10 @@ datcase$nitems <- aggregate(item ~ case, dat, function(x)
length(unique(x)), na.action = NULL)$item
datcase$npaths <- aggregate(path ~ case, dat, function(x)
length(unique(x)), na.action = NULL)$path
# datcase$ntopics <- aggregate(topic ~ case, dat,
# function(x) ifelse(all(is.na(x)), NA, length(unique(na.omit(x)))),
# na.action = NULL)$topic
#
# function(x) ifelse(all(is.na(x)), NA,
# length(unique(na.omit(x)))), na.action =
# NULL)$topic
datcase$vacation <- aggregate(vacation ~ case, dat,
function(x) ifelse(all(is.na(x)), 0, 1),
na.action = NULL)$vacation
@ -120,7 +120,7 @@ write.table(res,
quote = FALSE,
row.names = FALSE)
#--------------- (2) Investigate variants ---------------
#--------------- (3) Investigate variants ---------------
res$start <- res$date.start
res$complete <- res$date.stop