Error loading tidyverse after fresh install - R (loadNamespace, broom, backports) - r

I just updated R to version 4.0.2 and updated RStudio Desktop to version 1.3.959. As seen in the code below, I am unable to load tidyverse after what appears to be a successful installation. However, data.table installs and loads perfectly fine. Does anyone have experience with this? Thanks!
Code from console (tidyverse error):
> install.packages('tidyverse')
Installing package into ‘C:/Users/iangm/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
also installing the dependencies ‘RColorBrewer’, ‘scales’, ‘dplyr’, ‘ggplot2’
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/RColorBrewer_1.1-2.zip'
Content type 'application/zip' length 55583 bytes (54 KB)
downloaded 54 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/scales_1.1.1.zip'
Content type 'application/zip' length 560984 bytes (547 KB)
downloaded 547 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/dplyr_1.0.0.zip'
Content type 'application/zip' length 1302777 bytes (1.2 MB)
downloaded 1.2 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/ggplot2_3.3.2.zip'
Content type 'application/zip' length 4068169 bytes (3.9 MB)
downloaded 3.9 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/tidyverse_1.3.0.zip'
Content type 'application/zip' length 440050 bytes (429 KB)
downloaded 429 KB
package ‘RColorBrewer’ successfully unpacked and MD5 sums checked
package ‘scales’ successfully unpacked and MD5 sums checked
package ‘dplyr’ successfully unpacked and MD5 sums checked
package ‘ggplot2’ successfully unpacked and MD5 sums checked
package ‘tidyverse’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\iangm\AppData\Local\Temp\RtmpkNazQW\downloaded_packages
> library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’:
.onLoad failed in loadNamespace() for 'broom', details:
call: loadNamespace(name)
error: there is no package called ‘backports’
Code from console (data.table success):
> install.packages('data.table')
Installing package into ‘C:/Users/iangm/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/data.table_1.12.8.zip'
Content type 'application/zip' length 2325868 bytes (2.2 MB)
downloaded 2.2 MB
package ‘data.table’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\iangm\AppData\Local\Temp\RtmpkNazQW\downloaded_packages
> library(data.table)
data.table 1.12.8 using 2 threads (see ?getDTthreads). Latest news: r-datatable.com

There can be some problem with package backports: try to reinstall that package and load tidyverse again:
install.packages("backports")
library(tidyverse)
If that doesn't work, there might be problem with packages built under an earlier major version of R (i.e. 3.x). Try reinstalling all the packages with:
update.packages(ask = FALSE, checkBuilt = TRUE)
See more info here:
Is there a way to automate reinstalling packages and their dependencies in r?

Related

Unable to Load Built in Dataset

I'm trying to load the catsM dataset, but continue to get this error. I've tried the basics, restarting Rstudio, re-installing the package, etc., but continue to get this error.
install.packages("boot")
Installing package into ‘C:/Users/becky/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/boot_1.3-25.zip'
Content type 'application/zip' length 643617 bytes (628 KB)
downloaded 628 KB
package ‘boot’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\becky\AppData\Local\Temp\RtmpgHPMII\downloaded_packages
> library(boot)
> datasets:catsM
Error: object 'datasets' not found

Fail to install the "tidyverse" package

I am creating a plot using the ggplot() function in R Studio. For doing the job, I need to install the "tidyverse" package, but find installation failure. I will appreciate if you could solve the problem. The error messages are displayed in the console pane:
install.packages("tidyverse")
Installing package into ‘C:/Users/cheol/OneDrive/문서/R/win-library/3.6’
(as ‘lib’ is unspecified)
also installing the dependency ‘purrr’
trying URL 'https://cran.cnr.berkeley.edu/bin/windows/contrib/3.6/purrr_0.3.3.zip'
Content type 'application/zip' length 426130 bytes (416 KB)
downloaded 416 KB
trying URL 'https://cran.cnr.berkeley.edu/bin/windows/contrib/3.6/tidyverse_1.3.0.zip'
Content type 'application/zip' length 440226 bytes (429 KB)
downloaded 429 KB
package ‘purrr’ successfully unpacked and MD5 sums checked
Error in install.packages : ERROR: failed to lock directory ‘C:\Users\cheol\OneDrive\문서\R\win-library\3.6’ for modifying
Try removing ‘C:\Users\cheol\OneDrive\문서\R\win-library\3.6/00LOCK’

R error in package "glmnet": error backage foreach

I have R version 3.4.3. I'm working on a school project with glmnet.
I've tried to install the package and I didn't get any error code, but when I ask for with library(glmnet) I get these errors.
I have tried to remove it, installing it back, install foreach alone: the same problem!!
install.packages("glmnet", dependencies=TRUE)
Installing package into �C:/Users/freel_000/Documents/R/win-library/3.4�
(as �lib� is unspecified)
also installing the dependency �foreach�
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/foreach_1.4.4.zip'
Content type 'application/zip' length 388581 bytes (379 KB)
downloaded 379 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/glmnet_2.0-13.zip'
Content type 'application/zip' length 1769167 bytes (1.7 MB)
downloaded 1.7 MB
package ‘foreach’ successfully unpacked and MD5 sums checked
package ‘glmnet’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\freel_000\AppData\Local\Temp\Rtmpy4iKye\downloaded_packages`

There is a error while loading the library gmodels

> install.packages("gmodels",dependencies = TRUE)
Installing package into ‘C:/Users/OmPrakash/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/gmodels_2.16.2.zip'
Content type 'application/zip' length 74193 bytes (72 KB)
downloaded 72 KB
package ‘gmodels’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in :
C:\Users\OmPrakash\AppData\Local\Temp\RtmpO6JFcq\downloaded_packages
> library(gmodels)
Error: package or namespace load failed for ‘gmodels’ in library.dynam(lib, package, package.lib):
DLL ‘gtools’ not found: maybe not installed for this architecture?
It seems like gtools is not well installed.
You should try manually installing it.
Colin

package "plink" is not available

Hello
When I installing plink, I get the messages.
(My version 3.1.3)
In the site, http://healthstat.snu.ac.kr/CRAN/index.html
I can not find the "plink".
How can I use "plink"?
![enter image description here][1]
You need to specify the repos argument.
> install.packages("plink", repos = "http://www2.uaem.mx/r-mirror")
Installing package into ‘C:/.../R/win-library/3.1’
(as ‘lib’ is unspecified)
also installing the dependency ‘statmod’
trying URL 'http://www2.uaem.mx/r-mirror/bin/windows/contrib/3.1/statmod_1.4.17.zip'
Content type 'application/zip' length 155890 bytes (152 KB)
opened URL
downloaded 152 KB
trying URL 'http://www2.uaem.mx/r-mirror/bin/windows/contrib/3.1/plink_1.3-1.zip'
Content type 'application/zip' length 854055 bytes (834 KB)
opened URL
downloaded 834 KB
package ‘statmod’ successfully unpacked and MD5 sums checked
package ‘plink’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\...\Local\Temp\RtmpIzfu4y\downloaded_packages
> library(plink)
Loading required package: lattice

Resources