在R中安装软件包没有限制,但基本R也有一些与之关联的软件包。因此,无需每次都在R控制台中安装或加载它们。我们可以直接使用任何基本的R包函数来执行分析。如果要获取这些软件包的列表,则可以使用如下所示的代码:
> installed.packages(priority="base")
输出结果
Package LibPath Version Priority base "base" "C:/Program Files/R/R-4.0.2/library" "4.0.2" "base" compiler "compiler" "C:/Program Files/R/R-4.0.2/library" "4.0.2" "base" datasets "datasets" "C:/Program Files/R/R-4.0.2/library" "4.0.2" "base" graphics "graphics" "C:/Program Files/R/R-4.0.2/library" "4.0.2" "base" grDevices "grDevices" "C:/Program Files/R/R-4.0.2/library" "4.0.2" "base" grid "grid" "C:/Program Files/R/R-4.0.2/library" "4.0.2" "base" methods "methods" "C:/Program Files/R/R-4.0.2/library" "4.0.2" "base" parallel "parallel" "C:/Program Files/R/R-4.0.2/library" "4.0.2" "base" splines "splines" "C:/Program Files/R/R-4.0.2/library" "4.0.2" "base" stats "stats" "C:/Program Files/R/R-4.0.2/library" "4.0.2" "base" stats4 "stats4" "C:/Program Files/R/R-4.0.2/library" "4.0.2" "base" tcltk "tcltk" "C:/Program Files/R/R-4.0.2/library" "4.0.2" "base" tools "tools" "C:/Program Files/R/R-4.0.2/library" "4.0.2" "base" utils "utils" "C:/Program Files/R/R-4.0.2/library" "4.0.2" "base" Depends Imports LinkingTo base NA NA NA compiler NA NA NA datasets NA NA NA graphics NA "grDevices" NA grDevices NA NA NA grid NA "grDevices, utils" NA methods NA "utils, stats" NA parallel NA "tools, compiler" NA splines NA "graphics, stats" NA stats NA "utils, grDevices, graphics" NA stats4 NA "graphics, methods, stats" NA tcltk NA "utils" NA tools NA NA NA utils NA NA NA Suggests Enhances base "methods" NA compiler NA NA datasets NA NA graphics NA NA grDevices "KernSmooth" NA grid "lattice" NA methods "codetools" NA parallel "methods" "snow, nws, Rmpi" splines "Matrix, methods" NA stats "MASS, Matrix, SuppDists, methods, stats4" NA stats4 NA NA tcltk NA NA tools "codetools, methods, xml2, curl, commonmark" NA utils "methods, xml2, commonmark" NA License License_is_FOSS License_restricts_use OS_type base "Part of R 4.0.2" NA NA NA compiler "Part of R 4.0.2" NA NA NA datasets "Part of R 4.0.2" NA NA NA graphics "Part of R 4.0.2" NA NA NA grDevices "Part of R 4.0.2" NA NA NA grid "Part of R 4.0.2" NA NA NA methods "Part of R 4.0.2" NA NA NA parallel "Part of R 4.0.2" NA NA NA splines "Part of R 4.0.2" NA NA NA stats "Part of R 4.0.2" NA NA NA stats4 "Part of R 4.0.2" NA NA NA tcltk "Part of R 4.0.2" NA NA NA tools "Part of R 4.0.2" NA NA NA utils "Part of R 4.0.2" NA NA NA MD5sum NeedsCompilation Built base NA NA "4.0.2" compiler NA NA "4.0.2" datasets NA NA "4.0.2" graphics NA "yes" "4.0.2" grDevices NA "yes" "4.0.2" grid NA "yes" "4.0.2" methods NA "yes" "4.0.2" parallel NA "yes" "4.0.2" splines NA "yes" "4.0.2" stats NA "yes" "4.0.2" stats4 NA NA "4.0.2" tcltk NA "yes" "4.0.2" tools NA "yes" "4.0.2" utils NA "yes" "4.0.2"