Devtools/library download error - r

I am trying to install Devtools into Rstudio. I was using Rgui, but decided to use Rstudio becuase it seems to be easier. I able to get DevTools on Rgui, but not RStudio.
Basicly. the library on Rstudio does not have DEVtools installed and I am having problems. Any ideas?
I tried the install.packages("devtools") states it is install in y computer, but does not show in the library. I tried GitHub. did not wok either.
install.packages("devtools")
Installing package into ‘C:/Users/Steven/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
trying
URL 'https://cran.rstudio.com/bin/windows/contrib/3.2/devtools_1.10.0.zip'
Content type 'application/zip' length 391482 bytes (382 KB)
downloaded 382 KB
package ‘devtools’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot remove prior installation of package ‘devtools’
The downloaded binary packages are in
C:\Users\Steven\AppData\Local\Temp\RtmpkxtbPl\downloaded_packages
However, I do Library(devtools) states Error in library(devtools) : there is no package called ‘devtool

Related

Dependency limma not available when installing MKmisc package

When installing this package in R 4.2.1
install.packages("MKmisc")
I have this output
Installing package into ‘C:/Users/blahblah/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependency ‘limma’ is not available
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/MKmisc_1.8.zip'
Content type 'application/zip' length 769544 bytes (751 KB)
downloaded 751 KB
package ‘MKmisc’ successfully unpacked and MD5 sums checked
It does not work as we need to download the package limma so let's do it
install_github("cran/limma")
However it gives an error and the MKmisc package is still not working
What should I do to handle this problem?
"limma" can be installed using BiocManager.
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("limma")
install.packages("MKmisc")
# * DONE (MKmisc)
# The downloaded source packages are in
# ‘/tmp/Rtmphwh6rY/downloaded_packages’

Unable to install package Rcpp successfully in R Studio

I am unable to install the package "rcpp" in R Studio even though it was executed successfully. When I try to load the sasme library, it doesnt show me in the list of installed libraries.
install.packages("Rcpp")
Installing package into ‘C:/Users/sk/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/Rcpp_1.0.4.6.zip'
Content type 'application/zip' length 3030990 bytes (2.9 MB)
downloaded 2.9 MB
package ‘Rcpp’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot remove prior installation of package ‘Rcpp’
library(Rcpp)
Error in library(Rcpp) : there is no package called ‘Rcpp’
I was able to install by downloading the .tar.gz file from the archive link:
https://cran.r-project.org/src/contrib/Archive/Rcpp/
and installing this instead of directly from CRAN.
I had to install a few other libraries which were dependent on this library as well.

Bioconductor installation difficulty

recently I've changed a computer into a new one and suddenly I cannot install Bioconductor. I used this code, and this is what I get:
source("https://bioconductor.org/biocLite.R")
Installing package into ‘\\uniwa.uwa.edu.au/userhome/students8/21891458/My Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
trying URL 'https://bioconductor.org/packages/3.7/bioc/bin/windows/contrib/3.5/BiocInstaller_1.30.0.zip'
Content type 'application/zip' length 102191 bytes (99 KB)
downloaded 99 KB
package ‘BiocInstaller’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot remove prior installation of package ‘BiocInstaller’
The downloaded binary packages are in
C:\Users\21891458\AppData\Local\Temp\Rtmp2DZpRQ\downloaded_packages
'biocLite.R' failed to install 'BiocInstaller', use 'install.packages("BiocInstaller",
repos="https://bioconductor.org/packages/3.7/bioc")' or 'install.packages("BiocInstaller",
repos="http://bioconductor.org/packages/3.7/bioc")'
The problem is it doesn't install it. I tried removing Bioconductor, I tried removing BiocInstaller and I tried even reinstalling Rstudio. None of this helped. What am I doing wrong?

Error in library(ggplot2) : There is no package called 'ggplot2'

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..."

Persistent problems installing the car package in 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

Resources