diff --git a/ks_test_all_timepoints.R b/ks_test_all_timepoints.R index a1a0936..8581de5 100644 --- a/ks_test_all_timepoints.R +++ b/ks_test_all_timepoints.R @@ -10,6 +10,10 @@ getwd() ############################################################ # source data source("read_data.R") + +# clear unwanted variables +rm(my_data) + ############################################################ #=================================== # output: KS test for cumulated time diff --git a/ks_test_time.R b/ks_test_time.R index 4df3778..0b6022c 100644 --- a/ks_test_time.R +++ b/ks_test_time.R @@ -10,6 +10,10 @@ getwd() ############################################################ # source data source("read_data.R") + +# clear unwanted variables +rm(my_data) + ############################################################ #=================================== # output: KS test at each timepoint diff --git a/read_data.R b/read_data.R index cc7daea..fc0a0c1 100755 --- a/read_data.R +++ b/read_data.R @@ -19,10 +19,14 @@ outdir_stats = "~/git/covid_data/output/stats/" #========================================================== # input data files +infile_covid = paste0(datadir,"/covid19_v3.csv") + infile_icu_wf = paste0(datadir,"/icu_covid_wf_v3.csv") infile_icu_lf = paste0(datadir,"/icu_covid_lf_v3.csv") #%%======================================================== -# read file +# read files +my_data = read.csv(infile_covid, stringsAsFactors = F) + wf_data = read.csv(infile_icu_wf , stringsAsFactors = F) dim(wf_data) diff --git a/stats_paired.R b/stats_paired.R index e37c99c..ffeeeca 100755 --- a/stats_paired.R +++ b/stats_paired.R @@ -10,6 +10,10 @@ getwd() ############################################################ # source data source("read_data.R") + +# clear unwanted variables +rm(my_data) + ############################################################ #========================= # output: paired_analysis diff --git a/stats_unpaired.R b/stats_unpaired.R index 73600d5..c9cac4d 100755 --- a/stats_unpaired.R +++ b/stats_unpaired.R @@ -10,6 +10,10 @@ getwd() ############################################################ # source data source("read_data.R") + +# clear unwanted variables +rm(my_data) + ############################################################ #============================ # Output: unpaired analysis diff --git a/summary_stats_time.R b/summary_stats_time.R index be1a9de..fb4b584 100755 --- a/summary_stats_time.R +++ b/summary_stats_time.R @@ -10,6 +10,10 @@ getwd() ############################################################ # source data source("read_data.R") + +# clear unwanted variables +rm(my_data) + ############################################################ #=============================== # output: summary stats by time diff --git a/summary_stats_time_outcome.R b/summary_stats_time_outcome.R index 8511d9f..8fb6e8c 100755 --- a/summary_stats_time_outcome.R +++ b/summary_stats_time_outcome.R @@ -10,6 +10,10 @@ getwd() ############################################################ # source data source("read_data.R") + +# clear unwanted variables +rm(my_data) + ############################################################ #========================================= # output: summary stats by time + outcome