melting data.table seems to crash RStudio?

2019-07-24 18:12发布

After a bit of googling and stalking stackoverflow, I think I may have stumbled onto a bug with the reshape2 package (or data.table, I'm not sure). Specifically, I am unable to melt a particular data.table of mine.

Here's a reproducible example (you can find a copy of that particular .Rdata file here):

library(data.table)
library(ggplot2)
library(reshape2)

load("mpi_cv_vanilla_random_gov_17h55--100_class_widths.Rdata")

melt(par.grid.results)

Before I run melt, my usessionInfo is as follows:

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

locale:
[1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
[4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
[7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] reshape2_1.2.2    ggplot2_0.9.3.1   data.table_1.8.10

loaded via a namespace (and not attached):
[1] colorspace_1.2-4   dichromat_2.0-0    digest_0.6.4       grid_3.0.2        
[5] gtable_0.1.2       labeling_0.2       MASS_7.3-29        munsell_0.4.2     
[9] plyr_1.8           proto_0.3-10       RColorBrewer_1.0-5 scales_0.2.3      
[13] stringr_0.6.2      tools_3.0.2       

And once I run melt(par.grid.results), RStudio throws up the picture of the bomb with dialogue:

"R Session Aborted \nR encountered a fatal error \nThe session was terminated".

If anyone has any ideas as to what's going on, I'd love to hear them.

Thanks!

Edit: Running this inside the terminal, I get the following error (segfault):

> melt(par.grid.results)
Using  as id variables

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

Traceback:
1: unlist(unname(data[var$measure]))
2: melt.data.frame(par.grid.results)
3: melt(par.grid.results)

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace

0条回答
登录 后发表回答