From 55adcf03d71fbe4bcf31facc3a75619f55d341b3 Mon Sep 17 00:00:00 2001 From: nwickel Date: Wed, 20 Sep 2023 16:11:05 +0200 Subject: [PATCH] Added tikz picture about package structure for mtt --- code/02_preprocessing.R | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/code/02_preprocessing.R b/code/02_preprocessing.R index 57b5e84..ec85a1e 100644 --- a/code/02_preprocessing.R +++ b/code/02_preprocessing.R @@ -4,6 +4,8 @@ source("functions.R") small <- TRUE +now <- Sys.time() + # Read data ############################################################## cat("########## Reading in data... ##########", "\n") @@ -22,14 +24,14 @@ dat <- subset(dat0, !(dat0$event %in% c("Start Application", "Show Application"))) save(dat, file = paste0("tmp/dat_", ifelse(small, "small_", "full_"), - as.numeric(Sys.time()), ".RData")) + format(now, "%Y-%m-%d_%H-%M-%S"), ".RData")) # Add trace variable ##################################################### cat("########## Adding trace variable... ##########", "\n") dat1 <- add_trace(dat) save(dat1, file = paste("tmp/dat1", ifelse(small, "small_", "full_"), - as.numeric(Sys.time()), ".RData")) + format(now, "%Y-%m-%d_%H-%M-%S"), ".RData")) # Close events cat("########## Closing events... ##########", "\n") @@ -55,7 +57,7 @@ rownames(dat2) <- NULL # TODO: Throw warning about this save(dat2, file = paste("tmp/dat2", ifelse(small, "small_", "full_"), - as.numeric(Sys.time()), ".RData")) + format(now, "%Y-%m-%d_%H-%M-%S"), ".RData")) # Add case variable ###################################################### cat("########## Adding case and eventId variables... ##########", "\n") @@ -73,14 +75,14 @@ dat3 <- dat3[, c("fileId.start", "fileId.stop", "eventId", "case", "rotationDegree")] save(dat3, file = paste("tmp/dat3", ifelse(small, "small_", "full_"), - as.numeric(Sys.time()), ".RData")) + format(now, "%Y-%m-%d_%H-%M-%S"), ".RData")) # Add trace for move events ############################################## cat("\n########## Adding trace variable for move events... ##########", "\n") dat4 <- add_trace_moves(dat3) save(dat4, file = paste("tmp/dat4", ifelse(small, "small_", "full_"), - as.numeric(Sys.time()), ".RData")) + format(now, "%Y-%m-%d_%H-%M-%S"), ".RData")) # Add topics: file names and topics ###################################### cat("########## Adding information about topics... ##########", "\n") @@ -93,7 +95,7 @@ topics <- extract_topics(artworks, pattern = paste0(artworks, ".xml"), dat5 <- add_topic(dat4, topics = topics) save(dat5, file = paste("tmp/dat5", ifelse(small, "small_", "full_"), - as.numeric(Sys.time()), ".RData")) + format(now, "%Y-%m-%d_%H-%M-%S"), ".RData")) # TODO: Replace artwork with informative strings