我怎么知道哪些包干扰了其他包?

时间:2017-10-03 19:30:32

标签: r tidyverse purrr

我使用以下代码将一些文件放在一起:

data_path <- "daymet"
files <- dir(data_path, pattern = "*.csv")

daymet <- data_frame(filename = files) %>% 
  mutate(file_contents = map(filename, ~ read_csv(file.path(data_path, .), 
    skip=7)))%>%
  unnest()%>%
  mutate(site = str_sub(filename, 1, 3))  

起初我遇到了一些错误&#34;&#39; GAJPCSR1_2003_2011.csvMapEnv&#39;不是来自&namespace; maps&#39;&#34;的导出对象。我重新安装了purrr。错误消失了,一切正常!

我用其余的分析把它放回去,清理了我的环境,当R到达这个块时,同样的错误信息又回来了。

我已经获得了所有这些其他软件包,因此似乎其中一个软件包与purrr不兼容。或者可能不是。即使我没有加载所有包,我仍然会收到相同的错误消息。

会话信息:

R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

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

other attached packages:
 [1] reprex_0.1.1    mapdata_2.2-6   maps_3.2.0      ggmap_2.6.1     soilDB_1.8.5    aqp_1.10       
 [7] stringr_1.1.0   modelr_0.1.0    lubridate_1.6.0 dplyr_0.5.0     purrr_0.2.3     readr_1.0.0    
[13] tidyr_0.6.1     tibble_1.2      ggplot2_2.2.1   tidyverse_1.1.1

loaded via a namespace (and not attached):
 [1] httr_1.2.1          jsonlite_1.5        splines_3.3.2       Formula_1.2-1      
 [5] assertthat_0.2.0    sp_1.2-5            latticeExtra_0.6-28 backports_1.0.5    
 [9] lattice_0.20-34     digest_0.6.12       RColorBrewer_1.1-2  checkmate_1.8.2    
[13] rvest_0.3.2         colorspace_1.3-2    htmltools_0.3.5     Matrix_1.2-7.1     
[17] plyr_1.8.4          psych_1.6.12        devtools_1.12.0     clipr_0.3.3        
[21] XML_3.98-1.8        broom_0.4.2         raster_2.5-8        haven_1.0.0        
[25] scales_0.4.1        whisker_0.3-2       jpeg_0.1-8          htmlTable_1.9      
[29] withr_1.0.2         nnet_7.3-12         lazyeval_0.2.0      mnormt_1.5-5       
[33] proto_1.0.0         survival_2.41-3     magrittr_1.5        readxl_0.1.1       
[37] evaluate_0.10       memoise_1.0.0       nlme_3.1-131        MASS_7.3-45        
[41] forcats_0.2.0       xml2_1.1.1          foreign_0.8-67      tools_3.3.2        
[45] data.table_1.10.4   hms_0.3             geosphere_1.5-5     RgoogleMaps_1.4.1  
[49] munsell_0.4.3       cluster_2.0.5       plotrix_3.6-4       callr_1.0.0        
[53] rlang_0.1.2         grid_3.3.2          rjson_0.2.15        htmlwidgets_0.8    
[57] rmarkdown_1.5       labeling_0.3        base64enc_0.1-3     gtable_0.2.0       
[61] DBI_0.5-1           reshape_0.8.6       reshape2_1.4.2      R6_2.2.0           
[65] gridExtra_2.2.1     knitr_1.17          rprojroot_1.2       Hmisc_4.0-3        
[69] stringi_1.1.2       parallel_3.3.2      Rcpp_0.12.10        mapproj_1.2-4      
[73] rpart_4.1-10        acepack_1.4.1       png_0.1-7          

1 个答案:

答案 0 :(得分:2)

您可以看到屏蔽或被屏蔽的所有内容

ResultSet

例如,在我目前的R会话中,您可以看到我已经回答了有关SO的问题,因为全球环境中的所有通用数据名称 conflicts(detail = TRUE) df,和dt屏蔽同名的基本功能。您可以看到数据表tfirst屏蔽了last版本,因为我在dplyr之后加载了data.table

dplyr