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
Many of us have been writing code for Windows and Linux (and OS X ...) for years. Construct yourself little helper functions isLinux <- function() unname(Sys.info()["sysname"]) == "Linux"
and likewise for Windows. Then construct your path programmatically:
Many of us have been writing code for Windows and Linux (and OS X ...) for years. Construct yourself little helper functions
isLinux <- function() unname(Sys.info()["sysname"]) == "Linux"
and likewise for Windows. Then construct your path programmatically:
ourRootDir <- function() ifelse( isLinux(), "/opt/data/someThing", "D:/data")
via
datapath <- file.path( ourRootDir(), "project", "some", "where")
and afterwards all actual analysis commands will most likely be portable without change.
Among the 4200+ CRAN package, very few do not exist on all platforms.
Also, data written via
save()
on one system can be loaded on another and as this is a binary format with compression, you also save a lot of time.https://stackoverflow.com/questions/14923800/how-to-run-r-code-written-under-windows-in-linux
The text was updated successfully, but these errors were encountered: