Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between r-base and r-recommended packages

Can anyone tell me what is the difference between base and recommended packages.

If there is link where base and recommended packages are mentioned please provide the links.

like image 972
jan5 Avatar asked Mar 14 '12 11:03

jan5


People also ask

What are the R base packages?

R is distributed with fifteen "base packages": base, compiler, datasets, grDevices, graphics, grid, methods, parallel, splines, stats, stats4, tcltk, tools, translations, and utils.

What is base R used for?

Base-R is the basic software which contains the R programming language. RStudio is software that makes R programming easier. Of course, they are totally free and open source.

What is the difference between package and library in R?

In R, a package is a collection of R functions, data and compiled code. The location where the packages are stored is called the library. If there is a particular functionality that you require, you can download the package from the appropriate site and it will be stored in your library.


1 Answers

The difference actually comes from R Core and the way the R code is organised, for example in the upstream SVN repository.

In src/library/, you have all 'base' packages:

  • base
  • compiler
  • datasets
  • graphics
  • grDevices
  • grid
  • methods
  • parallel
  • splines
  • stats
  • stats4
  • tcltk
  • tools
  • translations
  • utils.

And none of these are on CRAN -- they only exist as part of 'base R'.

And you have a directory src/library/Recommended which by default is empty, but can be filled by using a helper script (tools/rsync-recommended) to get the list of Recommended packages off CRAN from a special (versioned) directory. For R version 3.3.3, it is CRAN/src/contrib/3.3.3/Recommended/ (with the CRAN part being your default mirror). It contains

  • KernSmooth
  • MASS
  • Matrix
  • boot
  • class
  • cluster
  • codetools
  • foreign
  • lattice
  • mgcv
  • nlme
  • nnet
  • rpart
  • spatial
  • survival

Edit 2016-09-06: Added utils to first set.

like image 73
Dirk Eddelbuettel Avatar answered Sep 20 '22 01:09

Dirk Eddelbuettel