diff --git a/R/close_events.R b/R/close_events.R index 5ca8da6..479b55c 100644 --- a/R/close_events.R +++ b/R/close_events.R @@ -9,21 +9,21 @@ close_events <- function(data, event = c("move", "flipCard", "openTopic", "openP "move" = { actions <- c("Transform start", "Transform stop") idvar <- c("folder", "eventId", "artwork", "glossar") - drop <- c("popup", "topicNumber", "trace", "event") + drop <- c("popup", "topic", "trace", "event") ncol <- 18 }, "flipCard" = { actions <- c("Show Info", "Show Front") idvar <- c("folder", "trace", "eventId", "artwork", "glossar") - drop <- c("popup", "topicNumber", "event") + drop <- c("popup", "topic", "event") ncol <- 19 }, "openTopic" = { actions <- c("Artwork/OpenCard", "Artwork/CloseCard") idvar <- c("folder", "eventId", "trace", "glossar", - "artwork", "topicNumber") + "artwork", "topic") drop <- c("popup", "event") ncol <- 20 @@ -32,9 +32,9 @@ close_events <- function(data, event = c("move", "flipCard", "openTopic", "openP actions <- c("ShowPopup", "HidePopup") idvar <- c("folder", "eventId", "trace", "glossar", "artwork", "popup") - drop <- c("topicNumber", "event") + drop <- c("topic", "event") ncol <- 20 -# TODO: Should topicNumber maybe also be filled in for "openPopup"? +# TODO: Should topic maybe also be filled in for "openPopup"? } ) @@ -158,7 +158,7 @@ close_events <- function(data, event = c("move", "flipCard", "openTopic", "openP c("fileId.start", "fileId.stop", "folder", "event", "artwork", "trace", "glossar", "date.start", "date.stop", "timeMs.start", "timeMs.stop", - "duration", "topicNumber", "popup", "x.start", + "duration", "topic", "popup", "x.start", "y.start", "x.stop", "y.stop", "distance", "scale.start", "scale.stop", "scaleSize", "rotation.start", "rotation.stop", "rotationDegree")] @@ -237,7 +237,7 @@ add_variables <- function(data_split_wide, ncol, }, "openTopic" = { data_split_wide <- data_split_wide[, c("folder", "artwork", - "topicNumber", + "topic", "glossar", "trace", "eventId", "fileId.start", diff --git a/R/create_eventlogs.R b/R/create_eventlogs.R index 5444728..38dbdea 100644 --- a/R/create_eventlogs.R +++ b/R/create_eventlogs.R @@ -63,7 +63,7 @@ create_eventlogs <- function(data, xmlpath = NULL, case_cutoff = 20, dat3 <- dat3[, c("folder", "eventId", "case", "trace", "glossar", "event", "artwork", "fileId.start", "fileId.stop", "date.start", "date.stop", "timeMs.start", - "timeMs.stop", "duration", "topicNumber", "popup", + "timeMs.stop", "duration", "topic", "popup", "x.start", "y.start", "x.stop", "y.stop", "distance", "scale.start", "scale.stop", "scaleSize", "rotation.start", "rotation.stop", "rotationDegree")] diff --git a/R/extract_topics.R b/R/extract_topics.R index 05fa116..c78903f 100644 --- a/R/extract_topics.R +++ b/R/extract_topics.R @@ -32,7 +32,7 @@ extract_topics <- function(artworks, xmlfiles, xmlpath) { topic <- c(topic, gsub("^$", "\\1", grep("^