Unable to Load Built in Dataset - r

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

Related

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

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?

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’

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?

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`

Unable to load packages

I was trying to install lubridate package but cannot manage to load it to my library
Here are the errors I got.
install.packages("lubridate")
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/lubridate_1.3.3.zip'
Content type 'application/zip' length 664643 bytes (649 KB)
opened URL
downloaded 649 KB
package ‘lubridate’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\YingHaw\AppData\Local\Temp\Rtmp4KMRy3\downloaded_packages
library(lubridate)
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 ‘lubridate’
I don't understand why I am having this problem.

Resources