I had performed a fresh install of R and RStudio after deinstalling a previous version. I follow some of the commands given in the "R for data science" open book. I installed tidyverse and after that some other packages recommended by the author (various datasets) install.packages(c("nycflights13", "gapminder", "Lahman"))
. The installation of the packages worked without problems, but several dependencies were missing.
So here I am installing it:
choco install r.project r.studio -y
Then I opened RStudio and installed tidyverse
install.packages("tidyverse")
# lots of output skipped
package ‘sys’ successfully unpacked and MD5 sums checked
package ‘askpass’ successfully unpacked and MD5 sums checked
package ‘assertthat’ successfully unpacked and MD5 sums checked
package ‘curl’ successfully unpacked and MD5 sums checked
package ‘mime’ successfully unpacked and MD5 sums checked
package ‘openssl’ successfully unpacked and MD5 sums checked
package ‘stringi’ successfully unpacked and MD5 sums checked
package ‘cli’ successfully unpacked and MD5 sums checked
package ‘crayon’ successfully unpacked and MD5 sums checked
package ‘httr’ successfully unpacked and MD5 sums checked
package ‘jsonlite’ successfully unpacked and MD5 sums checked
package ‘magrittr’ successfully unpacked and MD5 sums checked
package ‘rstudioapi’ successfully unpacked and MD5 sums checked
package ‘stringr’ successfully unpacked and MD5 sums checked
package ‘xml2’ successfully unpacked and MD5 sums checked
package ‘tidyverse’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\somepath\downloaded_packages
installing the source package ‘R6’
trying URL 'https://cran.rstudio.com/src/contrib/R6_2.4.0.tar.gz'
Content type 'application/x-gzip' length 31545 bytes (30 KB)
downloaded 30 KB
* installing *source* package 'R6' ...
** Paket 'R6' erfolgreich entpackt und MD5 Summen überprüft
** R
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'R6'
finding HTML links ... fertig
R6Class html
as.list.R6 html
is.R6 html
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (R6)
In R CMD INSTALL
The downloaded source packages are in
‘C:\somepath\downloaded_packages’
And tried to load it
library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’:
.onLoad in loadNamespace() für 'broom' fehlgeschlagen, Details:
Aufruf: loadNamespace(name)
Fehler: es gibt kein Paket namens ‘backports’
So I installed backports (successfully), then:
library(tidyverse)
-- Attaching packages --------------------------------------- tidyverse 1.2.1 --
v ggplot2 3.0.0 v purrr 0.3.0
v tibble 1.4.2 v dplyr 0.7.8
v tidyr 0.8.2 v stringr 1.4.0
v readr 1.3.1 v forcats 0.3.0
Error: package or namespace load failed for ‘tidyverse’:
.onAttach in attachNamespace() für 'tidyverse' fehlgeschlagen, Details:
Aufruf: NULL
Fehler: package or namespace load failed for ‘ggplot2’:
.onAttach in attachNamespace() für 'ggplot2' fehlgeschlagen, Details:
Aufruf: loadNamespace(name)
Fehler: es gibt kein Paket namens ‘withr’
So after intalling "withr" it worked and tidyverse could be loaded. But then after performing
ggplot(mpg) + geom_point(aes(x = displ, y = hwy, color = class))
Error in loadNamespace(name) : es gibt kein Paket namens ‘digest’
Dependency "digest" was missing.
Is there a problem with the package or is this my system only?