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) diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 4e883b8..58a27e5 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -4,7 +4,7 @@ pkgdown_sha: ~ articles: data-details: data-details.html data-visualization: data-visualization.html -last_built: 2024-05-26T11:35Z +last_built: 2024-05-26T12:44Z urls: reference: https://ketsiaguichard.github.io/telraamStats/reference article: https://ketsiaguichard.github.io/telraamStats/articles diff --git a/docs/reference/import_sensor.html b/docs/reference/import_sensor.html index abbae70..077cf76 100644 --- a/docs/reference/import_sensor.html +++ b/docs/reference/import_sensor.html @@ -86,9 +86,9 @@