1

我有两个与 github 存储库相关的 R 项目。我一直在使用 repmis 函数 source_DropboxData 下载文件,然后在 dplyr 中使用 tbl_df

在这两个项目中,代码都是:

require(repmis)
require(plyr)
require(dplyr)
require(tidyr)
require(ggplot2)


# simd vars

simd_2009 <- source_DropboxData(
    file="simd_2009.csv",
    key="ghiu8n9db6rch9y"    
    ) %>% tbl_df() 

在其中一个项目中,这会使 RStudio 崩溃;在另一个它没有。

sessionInfo() 在有效的项目上:

> sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252    LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C                            LC_TIME=English_United Kingdom.1252    

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

other attached packages:
[1] knitr_1.9     ggplot2_1.0.0 tidyr_0.2.0   dplyr_0.4.1   plyr_1.8.1    repmis_0.3.3 

loaded via a namespace (and not attached):
 [1] assertthat_0.1    colorspace_1.2-4  DBI_0.3.1         digest_0.6.8      evaluate_0.5.5    formatR_1.0       grid_3.1.2       
 [8] gtable_0.1.2      httr_0.6.1        magrittr_1.5      MASS_7.3-35       munsell_0.4.2     packrat_0.4.2-1   parallel_3.1.2   
[15] proto_0.3-10      R.cache_0.10.0    R.methodsS3_1.6.1 R.oo_1.18.0       R.utils_1.34.0    Rcpp_0.11.3       reshape2_1.4.1   
[22] rJava_0.9-6       scales_0.2.4      stringr_0.6.2     tools_3.1.2       xlsx_0.5.7        xlsxjars_0.6.1   

sessionInfo() 关于崩溃的项目:

R version 3.1.2 (2014-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252    LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C                            LC_TIME=English_United Kingdom.1252    

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

other attached packages:
[1] ggplot2_1.0.0 tidyr_0.2.0   dplyr_0.4.1   plyr_1.8.1    repmis_0.4   

loaded via a namespace (and not attached):
 [1] assertthat_0.1    chron_2.3-45      colorspace_1.2-4  data.table_1.9.4  DBI_0.3.1         digest_0.6.4      grid_3.1.2       
 [8] gtable_0.1.2      httr_0.6.1        magrittr_1.5      MASS_7.3-35       munsell_0.4.2     packrat_0.4.2-1   parallel_3.1.2   
[15] proto_0.3-10      R.cache_0.10.0    R.methodsS3_1.6.1 R.oo_1.18.0       R.utils_1.34.0    Rcpp_0.11.3       reshape2_1.4     
[22] rJava_0.9-6       scales_0.2.4      stringr_0.6.2     tools_3.1.2       xlsx_0.5.7        xlsxjars_0.6.1 

差异的可能原因是什么,我该如何进一步调查?

更新

很明显,主要区别在于可以工作的版本使用 repmis_0.3.3 和不使用 repmis_0.4 的版本。我将研究使用 repmis 降级自身!

降级似乎不起作用 - “安装退出状态非零”

nb 我也在packrat这两个项目中使用

  • 我现在已经在任一包之外尝试了 repmis 0.4,它可以工作。但是 plyr 和 dplyr 没有安装。
  • 它适用于安装的 plyr...
4

1 回答 1

1

在这种情况下,packrat是导致问题。删除它解决了问题!

于 2015-02-12T16:08:09.593 回答