From 24c79672462f216bc14cd886c6ab4f65af698e79 Mon Sep 17 00:00:00 2001 From: nwickel Date: Fri, 22 Mar 2024 12:17:39 +0100 Subject: [PATCH] Updated script; removed old stuff --- code/08_case-characteristics.R | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/code/08_case-characteristics.R b/code/08_case-characteristics.R index a786821..87b63e3 100644 --- a/code/08_case-characteristics.R +++ b/code/08_case-characteristics.R @@ -5,10 +5,11 @@ # (3) Select features for navigation behavior # (4) Export data frames # -# input: results/haum/event_logfiles_2024-02-21_16-07-33.csv -# output: results/haum/eventlogs_pre-corona_case-clusters.csv +# input: results/event_logfiles_2024-02-21_16-07-33.csv +# output: results/dataframes_case_2019.RData +# results/centrality_cases.RData # -# last mod: 2024-03-08 +# last mod: 2024-03-22 # setwd("C:/Users/nwickelmaier/Nextcloud/Documents/MDS/2023ss/60100_master_thesis/analysis/code") @@ -16,7 +17,7 @@ source("R_helpers.R") #--------------- (1) Read data --------------- -load("results/haum/eventlogs_pre-corona_cleaned.RData") +load("results/eventlogs_pre-corona_cleaned.RData") # Select one year to handle number of cases dat <- dat[as.Date(dat$date.start) > "2018-12-31" & @@ -135,8 +136,8 @@ dattree <- data.frame(case = datcase$case, ) # centrality <- pbapply::pbsapply(dattree$case, get_centrality, data = dat) -# save(centrality, file = "results/haum/tmp_centrality.RData") -load("results/haum/tmp_centrality.RData") +# save(centrality, file = "results/centrality_cases.RData") +load("results/centrality_cases.RData") dattree$BetweenCentrality <- centrality @@ -171,17 +172,5 @@ dattree$AvDurItemNorm <- normalize(dattree$AvDurItem) #--------------- (4) Export data frames --------------- -save(dat, datcase, dattree, file = "results/haum/dataframes_case_2019.RData") - -write.table(datcase, - file = "results/haum/datcase.csv", - sep = ";", - quote = FALSE, - row.names = FALSE) - -write.table(datcase, - file = "results/haum/dattree.csv", - sep = ";", - quote = FALSE, - row.names = FALSE) +save(dat, datcase, dattree, file = "results/dataframes_case_2019.RData")