diff --git a/R/create_config.R b/R/create_config.R index dcd9e50..97e5934 100644 --- a/R/create_config.R +++ b/R/create_config.R @@ -86,13 +86,11 @@ get_config_path <- function(){ } if(dir.exists(tmp_folder)){ tmp_file = paste(tmp_folder, config_name, sep = "") - if(file.exists(tmp_file)) { - return(tmp_file) + if(!file.exists(tmp_file)) { + create_config() + message("Creation of a default config file in the temp directory, please use create_config() to overwrite.") + tmp_file = paste(tmp_folder, config_name, sep = "") } - } else { - create_config() - message("Creation of a default config file in the temp directory, please use create_config() to overwrite.") - tmp_file = paste(tmp_folder, config_name, sep = "") return(tmp_file) } } diff --git a/R/data_import.R b/R/data_import.R index 602e116..e2297ee 100644 --- a/R/data_import.R +++ b/R/data_import.R @@ -37,7 +37,7 @@ import_sensor <- function(list_sensor){ } data <- map_dfr(list_sensor, ~ { - file <- paste0('folder_path', .x, '.RData') + file <- paste0(folder_path, .x, '.RData') if (file.exists(file)) { # we select the data that we don't consider null (arbitrary choice) import <- load(file)