抓住了段映射内存未映射R

时间:2015-09-17 13:51:59

标签: r segmentation-fault

我正在处理数据框(30行x 54676列),并尝试在其上执行glm表达式。我启动了R并运行下面的代码,然后继续使用

*抓住了段错* 地址......'内存未映射'

我读到它可能是一个包bug,但不是我需要卸载的包。是否可能是版本问题?

以下是我在提出错误时从R获得的信息

R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> sessionInfo()
R version 3.0.2 (2013-09-25)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8    
 [5] LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_GB.UTF-8   
 [7] LC_PAPER=en_GB.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     
a=read.table('GDS4521.soft',skip=77,sep='\t',nrows=54675,header=1,row.names=1)
> 
> a=a[,-1]
> 
> for (i in 1:ncol(a)){
+ a[,i]=a[,i]/a['200650_s_at',i]
+ }
> 
> a=data.frame(t(a))
> a=cbind(a,hadStroke=c(rep(1,20),rep(0,20)))
> a$hadStroke=factor(a$hadStroke) 
> set.seed(2134)
> s=sample(40,30)
> training=a[s,]
> dim(training)
[1]    30 54676
> mod=glm(hadStroke~.,data=training,family=binomial)

 *** caught segfault ***
address 0x7f0603061fbc, cause 'memory not mapped'

Traceback:
 1: terms.formula(formula, data = data)
 2: terms(formula, data = data)
 3: model.frame.default(formula = hadStroke ~ ., data = training,         drop.unused.levels = TRUE)
 4: stats::model.frame(formula = hadStroke ~ ., data = training,     vdrop.unused.levels = TRUE)
 5: eval(expr, envir, enclos)
 6: eval(mf, parent.frame())
 7: glm(hadStroke ~ ., data = training, family = binomial)

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: 

0 个答案:

没有答案