Skip to content

UDUNITS2_XML_PATH is ignored #21

Description

@JimMcL

R/windows/load.R contains an .onLoad function which unconditionally sets the UDUNITS2_XML_PATH environment variable, so ignores any user specified value. I don't know why this was done, and I don't know whether it's specific to Windows (as suggested by the directory name), but it makes it difficult to specify a database with custom units.

Workaround:

# Load but don't attach library
loadNamespace("udunits2")
Sys.setenv(UDUNITS2_XML_PATH = "udunits/udunits2.xml")
# Attach library, read database using new value of UDUNITS2_XML_PATH
library(udunits2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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