-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explore if fs::file_exists()
is more convenient for checking data path existence in main run_pacta_data_preparation.R
#119
Comments
For reference, the documentation of Currently, the base R equivalent |
Title updated. |
Generally, these are the primary differences between functions in https://github.com/r-lib/fs?tab=readme-ov-file#comparison-vs-base-equivalents
I am also aware of another significant difference: that the way Specifically to the context that was discussed in #99, the dir_name <- "~/Desktop/"
isTRUE(file.exists(file.path(dir_name, "dataprep")))
#> [1] TRUE
isTRUE(file.exists(file.path(dir_name, "FOO")))
#> [1] FALSE
isTRUE(file.exists(file.path(dir_name, "")))
#> [1] TRUE
isTRUE(file.exists(file.path(dir_name, NULL)))
#> [1] FALSE
isTRUE(fs::file_exists(file.path(dir_name, "dataprep")))
#> [1] TRUE
isTRUE(fs::file_exists(file.path(dir_name, "FOO")))
#> [1] FALSE
isTRUE(fs::file_exists(file.path(dir_name, "")))
#> [1] TRUE
isTRUE(fs::file_exists(file.path(dir_name, NULL)))
#> [1] FALSE
isTRUE(fs::file_exists(fs::path(dir_name, "dataprep")))
#> [1] TRUE
isTRUE(fs::file_exists(fs::path(dir_name, "FOO")))
#> [1] FALSE
isTRUE(fs::file_exists(fs::path(dir_name, "")))
#> [1] TRUE
isTRUE(fs::file_exists(fs::path(dir_name, NULL)))
#> [1] FALSE |
fs::file_exists()
is more convenient for checking data path existence in main run_data_preparation
👌 |
re-opening with a renewed focus on the |
fs::file_exists()
is more convenient for checking data path existence in main run_data_preparationfs::file_exists()
is more convenient for checking data path existence in main run_pacta_data_preparation.R
I'd like to flag this for further investigation. I've had issues with the I don't expect the |
Since there are concerns with both |
Consider if the
file.exists()
checks in run_pacta_data_preparation.R can be improved to take into account the possibility of the paths specifying a directory instead of a file.related #118
workflow.data.preparation/run_pacta_data_preparation.R
Lines 106 to 121 in 0dc1012
originally from @jdhoffa
The text was updated successfully, but these errors were encountered: