More on R Language

In this lesson, we briefly touch upon installing packages in R language.

We'll cover the following

Packages in R language

Learning to program in R is important if you’re serious about understanding data. In this course, we have mentioned the basics to get you started with R language but rest assured there is much much more to learn.

However, the major ease that R language provides to programmers is the vast number of packages that can be imported in our programs. Many programmers and statisticians use R to design tools. These tools are then freely available as open source to the community. We can download these, import them as packages and easily use in our code.

Packages are pre-assembled collections of functions and objects.

We can import packages using the simple method:

install.packages("<nameOfPackage>")

Loading a package

Once you have installed a package, we can load it in our program using the library() function.

library(<package name>)
# Notice that we do not need the quotation marks now

Now you can simply use all the functions and objects of the respective package in our R program.


We have come to the end of this course. We have covered all the introductory concepts to get you started in programming with R. Remember, practice makes perfect. So keep practicing the concepts we have learned in this course. Keep learning and have fun with it.