How to check which packages are loaded in R?

R ProgrammingServer Side ProgrammingProgramming

We can do this by using 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
[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

So here we have base packages and ggplot2 version 3.2.1 package currently loaded in my R.

Updated on 06-Jul-2020 12:55:27