Skip to content

non-portable filename construction #8

Description

@mrd

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions