以下代码使我的R会话崩溃。我在Jupyter Notebook的RStudio和conda R中都尝试过:
qtm(shp = countries_spdf, fill = "population")
tm_shape(countries_spdf) + tm_fill(col = "population")
您可以从下面的代码中获取数据集:
download.file("http://s3.amazonaws.com/assets.datacamp.com/production/course_1816/datasets/02_countries_spdf.rds","data/02_countries_spdf.rds")
countries_spdf <- readr::read_rds("data/02_countries_spdf.rds")
错误:
断言失败:(0(,函数查询,文件 AbstractSTRtree.cpp,第 285 行。 中止陷阱:6
环境:
- Mac OSX 10.10.5
- R 版本 3.3.1 (2016-06-21(
- 康达 4.3.9
- 朱皮特笔记本 4.2.3
- RStudio 版本 1.0.44
也许不相关,但我什至无法加载当前版本的 tmap 和 tmaptools。当我尝试时,它崩溃了R。
> library(tmap)
*** caught segfault ***
address 0x18, cause 'memory not mapped'
Traceback:
1: dyn.load(file, DLLpath = DLLpath, ...)
2: library.dynam(lib, package, package.lib)
3: loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]])
4: asNamespace(ns)
5: namespaceImportFrom(ns, loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]), i[[2L]], from = package)
6: loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]])
7: asNamespace(ns)
8: namespaceImportFrom(ns, loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]), i[[2L]], from = package)
9: loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])
10: namespaceImport(ns, loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]), from = package)
11: loadNamespace(package, lib.loc)
12: doTryCatch(return(expr), name, parentenv, handler)
13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
14: tryCatchList(expr, classes, parentenv, handlers)
15: tryCatch({ attr(package, "LibPath") <- which.lib.loc ns <- loadNamespace(package, lib.loc) env <- attachNamespace(ns, pos = pos, deps)}, error = function(e) { P <- if (!is.null(cc <- conditionCall(e))) paste(" in", deparse(cc)[1L]) else "" msg <- gettextf("package or namespace load failed for %s%s:n %s", sQuote(package), P, conditionMessage(e)) if (logical.return) message(paste("Error:", msg), domain = NA) else stop(msg, call. = FALSE, domain = NA)})
16: library(tmap)
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection:
我正在运行当前的Mac OS X Sierra(10.12.6(和R 3.4.1。这在RStudio和R for Mac附带的R GUI中都会发生。