你安装的是最新版的 RRE吗? 7.4版开始 RRE就不跟R捆绑安装了 可能是你电脑里本来就有开源的R-3.1.3 所以RRE就没破坏R原来的配置
我这里又安装了Revolution Analytics公司提供的R-3.1.3
所以在RStudio里选择R的版本 我选的是 64位的 C:\Revolution\R-Enterprise-7.4\R-3.1.3
你的问题有两种方法解决
(方法一) 选择上述的选项之后,在你运行R的脚本 或者命令之前,都运行下面的代码
library(RevoScaleR)
library(RevoMods)
library(RevoUtils)
library(RevoUtilsMath)
(方法二)修改 C:\Revolution\R-Enterprise-7.4\R-3.1.3\etc\Rprofile.site 文件,代码如下:
Revo.version <- RevoUtils:::makeRevoVersion()
".Revo.tb"<-function(t) FALSE # set up stub debug instrumentation function
if (!identical(system.file(package="RevoScaleR"), "")) {
if (.Platform$OS.type == "windows"){
defaultRevoNodePath <- paste("C:\\Revolution\\R-Enterprise-Node-", paste(Revo.version$major, substr(Revo.version$minor,1,1), sep="."), sep="")
defaultRNodePath <- utils::shortPathName(R.home())
} else {
defaultRevoNodePath <- paste("/usr/lib64/Revo-", paste(Revo.version$major, substr(Revo.version$minor,1,1), sep="."), sep="")
defaultRNodePath <- paste(defaultRevoNodePath, "/R-", paste(R.version$major, R.version$minor, sep="."), "/lib64/R", sep="")
}
}
local(
{
# set a CRAN mirror
r <- getOption("repos")
if (!identical(system.file(package="RevoScaleR"),"")) {
if (.Platform$OS.type == "windows"){
r["CRAN"] <- RevoUtils::getRevoRepos(CRANmirror=TRUE)
} else {
r <- c(REVO=RevoUtils::getRevoRepos())
}
} else {
r["CRAN"] <- RevoUtils::getRevoRepos(MRANmirror=TRUE)
}
options(repos=r)
# set default packages
if (!identical(system.file(package="RevoScaleR") , "")){
if(file.exists(file.path(RevoUtils::Revo.home(), "RevoScaleR.enhanced"))) {
options(defaultPackages=c(getOption("defaultPackages"), "rpart", "lattice", "RevoScaleR", "RevoMods", "RevoUtils", "RevoUtilsMath"))
} else {
options(defaultPackages=c(getOption("defaultPackages"), "RevoScaleR", "RevoMods", "RevoUtils", "RevoUtilsMath"))
}
if (nchar(hostName <- Sys.getenv("REVOHADOOPHOST")) && nchar(portNumber <- Sys.getenv("REVOHADOOPPORT")))
{
RevoScaleR::rxHdfsConnect(hostName=hostName, portNumber=as.numeric(portNumber))
}
} else if (!identical(system.file(package="RevoUtilsMath"), "")) {
options(defaultPackages=c(getOption("defaultPackages"), "RevoUtils", "RevoUtilsMath"))
} else {
if (.Platform$OS.type == "windows") {
options(help_type="html")
}
options(defaultPackages=c(getOption("defaultPackages"), "RevoUtils"))
}
# branding information
.RevoVersionShort <- Revo.version$version.string
.RevoVersionShortLen <- regexpr("^.* \\d+\\.\\d+", .RevoVersionShort, perl=TRUE)
.RevoVersionShort <- substring(.RevoVersionShort, 1, attributes(.RevoVersionShortLen)$match)
if ("setWindowTitle" %in% getNamespaceExports("utils")) {
if (Revo.version$arch=="x86_64") {
.RevoVersionShort <- paste(.RevoVersionShort, "(64-bit)")
}
try(utils::setWindowTitle(paste(" - ", .RevoVersionShort)), silent=TRUE)
}
if (.Platform$OS.type == "unix" && capabilities("X11")) {
browseAvail <- Sys.which(c("firefox", "mozilla", "galeon", "opera", "xdg-open", "kfmclient", "gnome-moze-remote"))
if (any(browseAvail != "")) {
options(browser = browseAvail[which(browseAvail != "")[1]])
}
}
quiet <- any(match(c("-q", "--silent", "--quiet", "--slave"), commandArgs()), na.rm=TRUE)
if (!quiet){
if (!identical(system.file(package="RevoMods"), ""))
{
cat(.RevoVersionShort, ifelse(nchar(.RevoVersionShort) > 45, ":\n", ": "), "an enhanced distribution of R\n", sep="")
cat("Revolution Analytics packages Copyright (C)", Revo.version$year, "Revolution Analytics, Inc.\n\n")
cat("Type 'revo()' to visit www.revolutionanalytics.com for the latest\n")
cat("Revolution R news, 'forum()' for the community forum, or 'readme()'\n")
cat("for release notes.\n\n")
} else {
rroVersion <- paste(unlist(unclass(utils::packageVersion("RevoUtils"))), collapse=".")
cat("Revolution R Open ", rroVersion, " beta\n",sep="")
cat("The enhanced R distribution from Revolution Analytics\n",sep="")
cat("Visit mran.revolutionanalytics.com/open for information\n",sep="")
cat("about additional features and technical support options.\n\n",sep="")
}
}
}
)