You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
I am having the same issue. The following runs perfectly on macOS but fails on Windows, and having to call library() is not an option for package development.
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:
The text was updated successfully, but these errors were encountered: