我得到了caught segfault
每次我尝试从以下位置运行任何绘图函数时都会出错ggplot2
包(1.0.0)。我已经尝试过这个qplot
, geom_dotplot
, geom_histogram
等来自包的数据(例如diamonds
or economics
)工作得很好。
我正在Mac OS 10.9.4(最新版本)和R 3.1.1(也是最新版本)上运行。我在使用标准 R GUI、RStudio 以及从命令行使用 R 时遇到相同的错误。该命令会显示默认图形设备(用于 R GUI 和命令行的 Quartz),但也会显示终端错误。
library(ggplot2)
qplot(1:10)
给我错误:
*** caught segfault ***
address 0x18, cause 'memory not mapped'
Traceback:
1: .Call("plyr_split_indices", PACKAGE = "plyr", group, n)
2: split_indices(scale_id, n)
3: scale_apply(layer_data, x_vars, scale_train, SCALE_X, panel$x_scales)
4: train_position(panel, data, scale_x(), scale_y())
5: ggplot_build(x)
6: print.ggplot(list(data = list(), layers = list(<environment>), scales = <S4 object of class "Scales">, mapping = list(x = 1:3), theme = list(), coordinates = list(limits = list(x = NULL, y = NULL)), facet = list(shrink = TRUE), plot_env = <environment>, labels = list(x = "1:3", y = "count")))
7: print(list(data = list(), layers = list(<environment>), scales = <S4 object of class "Scales">, mapping = list(x = 1:3), theme = list(), coordinates = list( limits = list(x = NULL, y = NULL)), facet = list(shrink = TRUE), plot_env = <environment>, labels = list(x = "1:3", y = "count")))
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
这是我的会话信息:
R version 3.1.1 (2014-07-10)
Platform: x86_64-apple-darwin13.1.0 (64-bit)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] graphics grDevices utils datasets stats methods base
other attached packages:
[1] ggplot2_1.0.0 marelac_2.1.3 seacarb_3.0 shape_1.4.1 beepr_1.1 birk_1.1
loaded via a namespace (and not attached):
[1] audio_0.1-5 colorspace_1.2-4 digest_0.6.4 grid_3.1.1 gtable_0.1.2
[6] MASS_7.3-34 munsell_0.4.2 plyr_1.8.1 proto_0.3-10 Rcpp_0.11.2
[11] reshape2_1.4 scales_0.2.4 stringr_0.6.2 tools_3.1.1
我从其他人那里了解到这是某种内存问题,但即使我有超过 2 GB 的可用 RAM,也会出现此错误。我知道这是一个广泛使用的软件包,所以当然这不会发生在每个人身上,但为什么会发生在我身上呢?有谁知道我可以做什么来解决这个问题?