Skip to content
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

non-portable filename construction #8

Open
mrd opened this issue Aug 1, 2023 · 0 comments
Open

non-portable filename construction #8

mrd opened this issue Aug 1, 2023 · 0 comments

Comments

@mrd
Copy link

mrd commented Aug 1, 2023

f <- file.path(paste0(folder_path_land_cover,'/','land_cover.tif'))

Note that constructing pathnames with string concatenation like this can cause problems on systems that don't use forward slash as directory separator. Although these days that is mostly just Windows & probably R handles that for you. But just be aware.

There's a 'proper' way to do it:
https://stat.ethz.ch/R-manual/R-devel/library/base/html/file.path.html

I picked this example for the bug report, but like the other reports, there are multiple instances of this problem, I will only report one though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant