1.4 Installing Packages

  • The easiest way to install packages is to do it via R console. The command install.packages(“package name”) installs R packages directly from internet. Other options to install various dependencies to a package can be easily specified when calling this function. A call to this function asks the user to chose a CRAN mirror at the first instance.

  • Run the following to install Quantreg package on R. Also use the help function to get the details.

# Install a package using RStudio Console
install.packages("quantreg", dependencies = c("Depends", "Suggests"))
install.packages(c("zoo", "reshape2", "quantreg", "e1071", "foreign", "psych", "pastecs", 
    "ggplot2", "stargazer", "formatR", "plm", "xts", "tseries", "fArma"), dependencies = TRUE)
# to be updated