R: Installing Packages

Packages extend the capabilities of R. Packages contain libraries of code, functions, and data sets. While it is possible to create all your code from scratch, but why would you when someone has already done all the work for you.

Installing Packages in R is easy. For this lesson, we will install the HH package

-> install.packages(“HH”)

Or, you can use the GUI (graphical user interface)

From the top menu, Packages>Install package(s)…

rPackages

Select a CRAN mirror. I like to pick one close to me.

rPackages1

This lists all packages available on that mirror. I prefer this method as you can see a list of package and their proper spelling.

I chose HH.

rPackages2

Now just sit back and watch it install.

rPackages3

One thought on “R: Installing Packages

Leave a Reply to santhosh Cancel reply