Why am I not able to install the psych package?

170 Views Asked by At

I've been trying to install the "psych" and "ggplot2" packages on my work computer and keep getting the following error (see below for version information and what I've already tried):

install.packages("psych")
WARNING: Rtools is required to build R packages but no version of Rtools compatible with the currently running version of R was found. Note that the following incompatible version(s) of Rtools were found:

  - Rtools 3.2 (installed at c:\Rtools)

Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/

  There is a binary version available but the source version is later:
      binary source needs_compilation
psych  2.1.3  2.3.3             FALSE

installing the source package ‘psych’

trying URL 'https://cran.rstudio.com/src/contrib/psych_2.3.3.tar.gz'
Content type 'application/x-gzip' length 1588126 bytes (1.5 MB)
downloaded 1.5 MB

* installing *source* package 'psych' ...
** package 'psych' successfully unpacked and MD5 sums checked
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  there is no package called 'tmvnsim'
Calls: <Anonymous> ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
ERROR: lazy loading failed for package 'psych'
* removing 'C:/Users/the.user/Documents/R/R-3.6.2/library/psych'
Warning in install.packages :
  installation of package ‘psych’ had non-zero exit status

The downloaded source packages are in
    ‘C:\Users\the.user\AppData\Local\Temp\Rtmpm0Zlci\downloaded_packages’

I've installed and ran Rtools33.exe and cleared my environment, restarted my R session, and then quit and restarted the RStudio program. I've tried the same thing with Rtools32.exe.

The OS I'm running this on is Windows 10 Enterprise -- a 64-bit OS on a x64-based processor (is that why??)

Here is the version information output from the R.Version() function:

$platform
[1] "i386-w64-mingw32"

$arch
[1] "i386"

$os
[1] "mingw32"

$system
[1] "i386, mingw32"

$status
[1] ""

$major
[1] "3"

$minor
[1] "6.2"

$year
[1] "2019"

$month
[1] "12"

$day
[1] "12"

$`svn rev`
[1] "77560"

$language
[1] "R"

$version.string
[1] "R version 3.6.2 (2019-12-12)"

$nickname
[1] "Dark and Stormy Night"

I would greatly appreciate any help!

# Error for library()
Error in library(psych) : there is no package called 'psych'
0

There are 0 best solutions below