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)…


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


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.


Now just sit back and watch it install.


One thought on “R: Installing Packages

Please Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s