Create List of Installed Packages in R (Example)


In this article, I’ll explain how to get the names of all installed packages of a user in the R programming language.

The content of the page looks as follows:

Let’s jump right to the exemplifying R code:


Example: Return List of Installed Packages & Version Using installed.packages() Function

This example explains how to get the names of all installed add-on packages in R.

For this, we can use the installed.packages() function as shown below

my_packages <-[ , c(1, 3:4)])            # Apply installed.packages()
my_packages <- my_packages[$Priority), 1:2, drop = FALSE]  # Keep NA rows
rownames(my_packages) <- NULL                                               # Rename rows
head(my_packages)                                                           # First six packages


table 1 data frame list installed packages r


In Table 1 you can see that we have created a data frame containing all packages and versions of our installed packages.


Video, Further Resources & Summary

Would you like to know more about installed add-on packages? Then you may want to have a look at the following video of my YouTube channel. In the video, I’m explaining the R programming codes of this post:



In addition to the video, you may want to have a look at the other tutorials of this website. A selection of articles on topics such as directories and lists can be found below:


At this point you should have learned how to return a list of all installed add-on packages in R. In case you have additional questions and/or comments, let me know in the comments section below.


Subscribe to the Statistics Globe Newsletter

Get regular updates on the latest tutorials, offers & news at Statistics Globe.
I hate spam & you may opt out anytime: Privacy Policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.