Site de Jean-Michel RICHER

Maître de Conférences en Informatique à l'Université d'Angers

Ce site est en cours de reconstruction certains liens peuvent ne pas fonctionner ou certaines images peuvent ne pas s'afficher.


2.1. Packages and help

2.1.1. Install and load packages

Sometimes you need to install packages that contain certain functions. Use the install.packages() command for this purpose:

install.packages('stringi')

Then you can use or load the package with the library() function:

# use the library
library('stringi')

A list of packages can be found on the CRAN (for Comprehensive R Archive Network).

Here is a list of interesting packages:

  • JSONLITE to read JSON files
  • RMySQL to read data from MySQL database
  • XML to read data from XML files
  • reshape2 or tidyr to change data row and column formats from "wide" to "long"
  • many more here

2.1.2. Help

To get help in R simply use the command help():

# help about a function
help(cor)
 
# get help about package
help(package = "ggplot2")