Skip to content

non-portable filename construction #8

@mrd

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions