Using packages

Once installed, packages are loaded into the R environment using the function library(). For example, to use stringr you should type:

library(stringr)

If you see output similar to;

Error in library(stringr) : there is no package called ‘stringr’

then this means that stringr is not installed properly. Try installing it again with install.packages("stringr").

To get help on a package type ? followed by its name, e.g.

?stringr

You can also look for the vignette documentation and examples typing

vignette("stringr")
Exercise

Learn more about the packagestringr exploring its vigenette.

vignette("stringr")