All
I am trying to install and load 'dplyr' packages so that I can start to manipulate data at ease. Here is what I did and the error messages I got.
install.packages("dplyr")
Installing package into ‘C:/Users/YingHaw/Documents/R/win-library/3.1’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/dplyr_0.4.1.zip'
Content type 'application/zip' length 2596780 bytes (2.5 MB)
opened URL
downloaded 2.5 MB
package ‘dplyr’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\YingHaw\AppData\Local\Temp\Rtmp4KMRy3\downloaded_packages
library("dplyr")
Error in get(Info[i, 1], envir = env) :
cannot open file 'C:/Users/YingHaw/Documents/R/win-library/3.1/Rcpp/R/Rcpp.rdb': No such file or directory
Error: package or namespace load failed for ‘dplyr’
Can someone tell me what possibly went wrong?
Anson
Looks like you're facing issues in installing the dplyr package. Better remove both the packages plyr and dplyr (if already installed)and then try again installing it. if not better update your rstudio version and then try installing it
I have previously faced these issues but after removing and reinstalling it, that works.
Related
I'm trying to run this piece of code from a Github read.me file
## Install
```{r,eval=FALSE}
#install.packages('devtools')
devtools::install_github('jeff324/powder',build_vignettes = TRUE)
```
However. I keep getting this error message back in the console:
Downloading GitHub repo jeff324/powder#HEAD
Installing 1 packages: tibble
Installing package into ‘C:/Users/tessc/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/tibble_3.0.6.zip'
Content type 'application/zip' length 836388 bytes (816 KB)
downloaded 816 KB
package ‘tibble’ successfully unpacked and MD5 sums checked
Error: Failed to install 'powder' from GitHub:
(converted from warning) cannot remove prior installation of package ‘tibble’
>
Does anyone know what might be happening?
First thing I do when I get these types of errors is to Restart R. Go to Session -> Restart R. If that doesn't work, try opening a brand new session in R Studio. I was just able to install this package. So fundamentally, it is working.
I'm not sure what's happening here but the caret package is not installing properly. I realize similar problems have been posted before but I can't figure it out.
install.packages("caret")
library(caret)
Error: package or namespace load failed for ‘caret’ in get(Info[i, 1], envir = env):
cannot open file 'C:/Users/John Compton/Documents/R/win-library/3.6/MASS/R/MASS.rdb': No such file or directory
So I've been trying to figure this out. I have the fully updated R 3.6.1, I also ran a thing that I've since lost of like install.packages("caret", repos = "cran/....", c = ("Dependencies", "Suggestions")) which took about 30 minutes and installed like every suggested package, so I don't know what the error could be. How do I fix the error with this package?
Edit: To include the install.package call
> install.packages("caret")
Installing package into ‘C:/Users/John Compton/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/caret_6.0-84.zip'
Content type 'application/zip' length 6237886 bytes (5.9 MB)
downloaded 5.9 MB
package ‘caret’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\John Compton\AppData\Local\Temp\RtmpGuKafa\downloaded_packages
>
I've had a problem for a while now in which I can't load the stringi package until I install it clean. This seems to work as long as I'm in a single R session. Then, some time later, maybe when I create a new session or probably after a longer delay, I have to install it again.
This all broke this morning for some reason. Now, if I can install it straight away, and load it, but it's not recognized by ggplot2. Specifically when I try to install ggplot2 I get:
> library(stringi)
> install.packages("ggplot2")
Installing package into ‘/home/bensmith/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/ggplot2_3.0.0.tar.gz'
Content type 'application/x-gzip' length 2847050 bytes (2.7 MB)
==================================================
downloaded 2.7 MB
* installing *source* package ‘ggplot2’ ...
** package ‘ggplot2’ successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/bensmith/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/libs/Rcpp.so':
/home/bensmith/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/libs/Rcpp.so: undefined symbol: R_ContinueUnwind
ERROR: lazy loading failed for package ‘ggplot2’
* removing ‘/home/bensmith/R/x86_64-pc-linux-gnu-library/3.4/ggplot2’
* restoring previous ‘/home/bensmith/R/x86_64-pc-linux-gnu-library/3.4/ggplot2’
Warning in install.packages :
installation of package ‘ggplot2’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpEStEk4/downloaded_packages’
As you can see, stringi loads successfully into the environment, but I get this error when installing ggplot2.
Elsewhere this problem has been reported as fixed by installing stringi, but here, that doesn't help. But I suspect something is wrong with the stringi installation because of the previous problems I have had having to continually reinstall it.
I have tried installing stringi and ggplot2 using
install.packages("stringi", type = "source")
install.packages("ggplot2", type = "source")
Once again, stringi installs but ggplot2 does not.
Seems to be installing Rcpp again that fixed the problem.
Thanks to commenter at https://community.rstudio.com/t/stringi-installation-not-recognized-consequently-ggplot-wont-install/11590
I'm new to R and I'm just trying to get through some tutorials.
When I try installing ggplot2, I get this error.
Error in library(ggplot2) : There is no package called 'ggplot2'
I tried these in R and RStudio.
install.packages("ggplot2", dep=T)
install.packages('ggplot2', repos='http://cran.us.r-project.org')
remove.packages("ggplot2")
but I get the error
(Error in remove.packages : there is no package called 'ggplot2')
This is what I get from install.packages("ggplot2")
> install.packages("ggplot2")
Installing package into ‘.../R/win-library/3.4’
(as ‘lib’ is unspecified)
Warning in install.packages :
'lib = ".../R/win-library/3.4"' is not writable
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/ggplot2_2.2.1.zip'
Content type 'application/zip' length 2784566 bytes (2.7 MB)
downloaded 2.7 MB
package ‘ggplot2’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot remove prior installation of package ‘ggplot2’
The downloaded binary packages are in
C:...\AppData\Local\temp\RtmpqaGNpr\downloaded_packages
I removed all ggplot2 files manually then tried to install again. Here's my result.
> install.packages("ggplot2")
Installing package into ‘.../R/win-library/3.4’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
trying URL 'https://ftp.osuosl.org/pub/cran/bin/windows/contrib/3.4/ggplot2_2.2.1.zip'
Content type 'application/zip' length 2784566 bytes (2.7 MB)
downloaded 2.7 MB
package ‘ggplot2’ successfully unpacked and MD5 sums checked
Warning: unable to move temporary installation ‘...\R\win-library\3.4\file26b43a54980\ggplot2’ to ‘...\R\win-library\3.4\ggplot2’
The downloaded binary packages are in
C:...\AppData\Local\temp\Rtmpq0T9a6\downloaded_packages
> library(ggplot2)
Error in library(ggplot2) : there is no package called ‘ggplot2’
> library("ggplot2")
Error in library("ggplot2") : there is no package called ‘ggplot2’
These code was run using R 3.4.2
Steps
Go To Tools
Install Packages
In Packages Text Box Type ggplot2
Check the checkbox install dependencies
When having this issue I would suggest :
try turning it off and on again
update R to last version if possible
remove manually all the folders related to the relevant package and retry the installation
change your default library location : How do you change library location in R?
Try launching R client directly from command prompt, then issue the instruction:
install.packages("ggplot2", lib="C:/Users/YourUser/Documents/R/win-library/3.3")
You need to update your R version and do this but you'll need install all packages again:
Tool > Global Options > R version (CHANGE) > Select "Use your machine's default version of R..."
I'm having problems installing the package car in R.
There are previous posts on the topic, including this one and this other one.
I have followed the suggestions I've come across so far without success. I am using R Version 3.2.2. and RStudio.
This is the message I get:
install.packages("car")
Installing package into ‘C:/Users/.../Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.2/car_2.1-3.zip'
Content type 'application/zip' length 1447213 bytes (1.4 MB)
downloaded 1.4 MB
package ‘car’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\...\AppData\Local\Temp\Rtmpc3xr5i\downloaded_packages
If I check I get,
?car
No documentation for ‘car’ in specified packages and libraries:
you could try ‘??car’
I tried installing it from R with Install packages from local zip drives, and looking for the zip in C:\Users\...\AppData\Local\Temp\Rtmpc3xr5i\downloaded_packages, but this is the result:
library(car)
Error in library.dynam(lib, package, package.lib) :
DLL ‘SparseM’ not found: maybe not installed for this architecture?
In addition: Warning message:
package ‘car’ was built under R version 3.2.5
Error: package or namespace load failed for ‘car’
I did try installing SparseM even before posting the OP without success:
> install.packages("SparseM")
Installing package into ‘C:/Users/.../Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.2/SparseM_1.7.zip'
Content type 'application/zip' length 795531 bytes (776 KB)
downloaded 776 KB
package ‘SparseM’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\...\AppData\Local\Temp\Rtmpc3xr5i\downloaded_packages
> ?SparseM
No documentation for ‘SparseM’ in specified packages and libraries:
you could try ‘??SparseM’
Follow up:
After a comment regarding R version 3.2.3 I thought it would be an easy fix to just download this version, install, and erase 3.2.2. The problem then is that RStudio did not seem to work. I un-installed and re-installed R-studio, and now I get this when opening R studio:
Without knowing what version of the car package you're using, it's hard to know exactly what the source of the problem is. It seems likely, however, that you haven't installed the proper version of the pbkrtest, on which the Rcmdr package depends.
Is there a compelling reason not to upgrade everything to their current versions, including R, all packages, and RStudio?
Best,
John