Get Names of All Installed Packages in R (Example Code)

In this article, I’ll explain how to return a list of all installed add-on packages in R.

Example: Create List of All Installed Packages in R

packages_list <- as.data.frame(installed.packages())             # Using installed.packages() function
packages_list <- packages_list[is.na(packages_list$Priority), ]  # Modifying list
packages_list <- packages_list$Package                           # Keep only package names
head(packages_list)                                              # Show first six package names
# [1] "abind"      "askpass"    "base64enc"  "brio"       "broom"      "callr"

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.
You need to agree with the terms to proceed

Menu
Top