
Library will make all of the package’s functions, data sets, and help files available to you until you close your current R session. (This is not true for the install.packages command). You can use them if you like, but quotation marks are optional for the library command. Notice that the quotation marks have disappeared. To use an R package, you next have to load it in your R session with the command: library( ) Installing a package doesn’t immediately place its functions at your fingertips. This is the main CRAN repository, and new packages can sometimes take a couple of days to make it around to all of the other mirrors. If you want to download a new package, try the Austria mirror first. Your downloads should be quickest if you select a mirror that is close to you. If this is your first time installing a package, R will prompt you to choose an online mirror of to install from. For example, to install the ggplot2, reshape2, and dplyr packages, run: install.packages( c( "ggplot2", "reshape2", "dplyr")) You can install multiple packages at once by linking their names with R’s concatenate function, c. This doesn’t eliminate every bug inside a package, but it does mean that you can trust a package on CRAN to run in the current version of R on your OS. CRAN tests each R package before publishing it. Anyone can write an R package and disseminate it as they like however, almost all R packages are published through the CRAN website. R can access the package here in future R sessions without reinstalling it. When R finds the package, it will download it into a libraries folder on your computer. This will search for the specified package in the collection of packages hosted on the CRAN site.

Open R and type the following into the command line: install.packages( "") The easiest way to install an R package is with the install.packages R function. The next major release of R) is available in the r-devel snapshot build.To use an R package, you must first install it on your computer and then load it in your current R session. A build of the development version (which will eventually become.Patches to this release are incorporated in the r-patched snapshot build.

