detecting operating system in R (e.g. for adaptive .Rprofile files) -


i wondering how automatically detect operating system in r, example place things in .rprofile.

i'm not sure using sys.info() since page says not implemented on r platforms; maybe use .platform instead? ?.platform has lot of useful information, since:

‘.platform’ list details of platform under r built. provides means write os-portable r code.

it seems packages included r use .platform much more sys.info.

josh: /c/r/r-2.12.0-src/src/library > grep ".platform" */r/* | wc -l 144 josh: /c/r/r-2.12.0-src/src/library > grep ".platform\$os.type" */r/* | wc -l 99 josh: /c/r/r-2.12.0-src/src/library > grep "sys.info" */r/* | wc -l 4 

Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -