Issue with installation and loading of tidyverse

Hi All,

I am new to R and was trying to install "tidyverse", however, it throws an error and I am not sure what can be done here. Please help out.

Below are log details -

install.packages("tidyverse", dependencies=TRUE)
Installing package into ‘C:/Users/Prerna Aggarwal/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/tidyverse_1.2.1.zip'
Content type 'application/zip' length 82348 bytes (80 KB)
downloaded 80 KB

package ‘tidyverse’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\Prerna Aggarwal\AppData\Local\Temp\RtmpOI54Ea\downloaded_packages

library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘psych’

try installing psych. It should have been installed at first but it may have been an issue.

  1. Restart session to have a clean one
  2. install.packages("psych")

Then try again library(tidyverse)

1 Like

It worked, Thanks

install.packages("psych")
Installing package into ‘C:/Users/Prerna Aggarwal/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/psych_1.8.3.3.zip'
Content type 'application/zip' length 5727743 bytes (5.5 MB)
downloaded 5.5 MB

package ‘psych’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\Prerna Aggarwal\AppData\Local\Temp\RtmpcFJ8Zv\downloaded_packages

library(tidyverse)
-- Attaching packages --------------------------------------- tidyverse 1.2.1 --
v ggplot2 2.2.1 v purrr 0.2.4
v tibble 1.4.2 v dplyr 0.7.4
v tidyr 0.8.0 v stringr 1.3.0
v readr 1.1.1 v forcats 0.3.0
-- Conflicts ------------------------------------------ tidyverse_conflicts() --
x dplyr::filter() masks stats::filter()
x dplyr::lag() masks stats::lag()
?tidyverse

1 Like