如何检查R中加载了哪些软件包?
我们可以使用sessionInfo()做到这一点。
> sessionInfo() R version 3.6.1 (2019-07-05) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 18363) Matrix products: default Random number generation: RNG: Mersenne-Twister Normal: Inversion Sample: Rounding locale: [1] LC_COLLATE=English_India.1252 LC_CTYPE=English_India.1252 [3] LC_MONETARY=English_India.1252 LC_NUMERIC=C [5] LC_TIME=English_India.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] ggplot2_3.2.1 loaded via a namespace (and not attached): [1] Rcpp_1.0.2 withr_2.1.2 crayon_1.3.4 dplyr_0.8.3 [5] assertthat_0.2.1 grid_3.6.1 R6_2.4.0 gtable_0.3.0 [9] magrittr_1.5 scales_1.0.0 pillar_1.4.2 rlang_0.4.0 [13] lazyeval_0.2.2 glue_1.3.1 purrr_0.3.2 munsell_0.5.0 [17] compiler_3.6.1 pkgconfig_2.0.2 colorspace_1.4-1 tidyselect_0.2.5 [21] tibble_2.1.3
因此,这里有基本软件包和R中当前加载的ggplot23.2.1版软件包。