我想安装新版本的R.
我下载了R-3.1.0.pkg并安装了它。
我将我的包从~/Library/R/3.0
复制到~/Library/R/3.1
新的R启动,但是当我尝试加载一些包时,我收到错误。
这似乎是由于ggplot2。因为我可以加载任何不依赖于ggplot2的包。
我刚刚使用install.packges()
重新安装了ggplot2,但仍然没有运气。当我尝试加载库时,R只是崩溃了。
我执行了update.packages()
。这与我迁移我的包的方式有关吗?
另外,我似乎有多个地方的包裹。虽然我认为RStudio似乎将所有这些安装在~/Library/Frameworks/R.framework/Versions/3.1/Resources/library
感谢
> library(Hmisc)
Loading required package: grid
Loading required package: lattice
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2
*** caught segfault ***
address 0x18, cause 'memory not mapped'
Traceback:
1: dyn.load(file, DLLpath = DLLpath, ...)
2: library.dynam(lib, package, package.lib)
3: loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])
4: namespaceImport(ns, loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]), from = package)
5: loadNamespace(package, c(which.lib.loc, lib.loc))
6: doTryCatch(return(expr), name, parentenv, handler)
7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
8: tryCatchList(expr, classes, parentenv, handlers)
9: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L msg <- conditionMessage(e) sm <- strsplit(msg, "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && identical(getOption("show.error.messages"), TRUE)) { cat(msg, file = stderr()) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
10: try({ ns <- loadNamespace(package, c(which.lib.loc, lib.loc)) env <- attachNamespace(ns, pos = pos, deps)})
11: library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc = lib.loc)
12: .getRequiredPackages2(pkgInfo, quietly = quietly)
13: library(Hmisc