In today’s tutorial we will learn to troubleshoot a common error which you might encounter in RStudio, Jupyter Notebook or other R development environment when trying to use a 3rd party package.
Reproducing the no package called dplyr error
- First off, open RStudio, Jupyter or your preferred R editor.
- Call the dplyr library as shown below:
- The R Console will return the following error:
Error in library(dplyr) : there is no package called ‘dplyr’
Here’s a screenshot of the error on RStudio:
Solving the error
Let us first understand the error. Base R capabilities are installed as a prerequisite for you to use RStudio or other R editor. The dplyr package is delivered as an add on to base R.
In our case, we try to call dplyr without being installed first. How to fix that? Simply install the dplyr library before invoking it from your script:
Once installation finishes, call dplyr and use it to augment your data wrangling capabilities.
THe dplyr package will be available in the Packages list in RStudio.
Troubleshooting the Error in install.packages : object ‘dplyr’ not found error
A common error is to try to install dplyr using the following syntax:
This will trigger the following error:
Error in install.packages : object 'dplyr' not found
Fixing this is super simple: make sure to use quotation marks: