-
Notifications
You must be signed in to change notification settings - Fork 44
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
does not seem to be case sensative #98
Comments
Thanks. The paths are different, but perhaps your file system is case-insensitive? |
is there a way to make them case sensitive ... |
thus the case sensitivity is not something that the here function catches? |
A small example: upper <- here::here("DESCRIPTION")
upper
#> [1] "/Users/kirill/git/R/fledge/DESCRIPTION"
lower <- here::here("description")
lower
#> [1] "/Users/kirill/git/R/fledge/description"
# Different paths
identical(upper, lower)
#> [1] FALSE
# Same canonical path
identical(fs::path_real(upper), fs::path_real(lower))
#> [1] TRUE
fs::path_real(lower)
#> /Users/kirill/git/R/fledge/DESCRIPTION
# Same file
identical(readLines(upper), readLines(lower))
#> [1] TRUE Created on 2023-10-02 with reprex v2.0.2 The paths are different, but they point to the same file. I'm on macOS, the behavior will be the same on Windows, but most likely different on Linux. Are you looking for the functionality that |
Hallo, In other words, my file with my data file stays the same but I am able to access it with a upper and lower case using the here function from my script. The file with my data is the following: final_data I can access the same data file with the two scripts below. df1 <- readRDS(here("final_data/xxx.RDS") ) df2 <- readRDS(here("Final_data/xxx.RDS") ) I hope this makes sense ... |
I think we're almost on the same page here. What happens if you ask |
Yes, so if I do that then I get the data. Sorry I changed the file names but the concept works the same. The data file can be upper or lower case and I get the same data file. If I do this, then I get the data:
Here I get the same data. The fs::path_real is upper case but the path file is lower.
|
so what does this all mean :-) |
Sorry, I don't understand the question. |
oh sorry. I was just wondering where this leaves the discussion. In the end, the path is not case sensitive but it accesses the same file? |
|
Many thanks!! |
Hallo,
I am not sure if this is a bug or something that is done on purpose. The file path does not appear to be case sensative. For example, both of these work. The file path on the one is without a capital f for file and for the second one there is a capital F for file.
df1 <- readRDS(here("final_data/xxx.RDS") )
df2 <- readRDS(here("Final_data/xxx.RDS") )
best,
Andrej
The text was updated successfully, but these errors were encountered: