有没有一种简单的方法来以编程方式确定 R 脚本是在 Windows 还是 Linux 中执行的?
最佳答案
if(.Platform$OS.type == "unix") {
} else {
}
关于R:确定脚本是在 Windows 还是 Linux 中运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2096473/
标签 r multiplatform
有没有一种简单的方法来以编程方式确定 R 脚本是在 Windows 还是 Linux 中执行的?
最佳答案
if(.Platform$OS.type == "unix") {
} else {
}
关于R:确定脚本是在 Windows 还是 Linux 中运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2096473/