Possible Duplicates:
detecting operating system in R (e.g. for adaptive .Rprofile files)
How can I determine in R what platform I'm running on?
R 中是否有一个原始函数可以返回有关运行 R 的系统的信息?我主要关心操作系统,但任何其他数据可能会有帮助。
最佳答案
使用Sys.info()
获取有关系统的所有信息,Sys.info()['sysname']
为您提供操作系统。
R.Version()
为您提供 R 的版本,包括您正在运行的架构(32 位 - i386 - 与 64 位 - x64 - )。
R.home()
和 system.file(package="xxx")
为您提供根目录位置的信息。包文件。
关于r - 如何检查 R 中的操作系统,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4747715/