Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error in library(dplyr) : there is no package called ‘dplyr’

Tags:

r

dplyr

I am trying to install dplyr package but got an error message saying

Error in library(dplyr) : there is no package called ‘dplyr’". 

I am using Windows and R i386 3.5.2. I tried to fix with install.packages("Rcpp") as suggested by others but still getting error message.

like image 852
xiongbenxiong Avatar asked Feb 10 '19 22:02

xiongbenxiong


People also ask

Why dplyr is not installed in my library?

The reason is that after you run " install.packages ("dplyr") ", the package installed in your R library (check here: C:\Program Files\R\R-3.5.1\library) is actually called "dbplyr". So if you run library (dplyr), there should be no library under this name.

Why is there no package called ‘X’ in library (“X”)?

Unfortunately, the RStudio console returns the error message Error in library (“X”) : there is no package called ‘X’. The reason for this is that I have not installed the caret package before loading it. In the next example, I’ll show how to solve this problem! In this example, I’ll demonstrate how to install and load a package properly.

Why is RStudio returning an error in library(“X”)?

Then, we might try to apply the following R code: Unfortunately, the RStudio console returns the error message Error in library (“X”) : there is no package called ‘X’. The reason for this is that I have not installed the caret package before loading it.

Why is R asking me to install from source?

When both binary and source versions are available, R asks you if you want to install from source, if you answer "no" to this question, it installs the binary version. I'm already using the latest version of RStudio. You might be running the latest RStudio version but that is not the same as having the latest R version.


3 Answers

Try install.packages("dplyr"), the double quote is important.

like image 172
Mensch Avatar answered Oct 17 '22 09:10

Mensch


You dont have the package installed. To do that use : install.packages("dplyr")

Then library(dplyr)

like image 2
JustGettinStarted Avatar answered Oct 17 '22 08:10

JustGettinStarted


this problem happened to me, too. The reason is that after you run "install.packages("dplyr")", the package installed in your R library (check here: C:\Program Files\R\R-3.5.1\library) is actually called "dbplyr".

So if you run library(dplyr), there should be no library under this name.

My solution is: turn off R studio, open it again. The run:

install.packages("Rcpp")
install.packages("dplyr")
like image 2
Sara Avatar answered Oct 17 '22 09:10

Sara