user2502904 user2502904 - 1 month ago 27
R Question

R language package ltm issue with library command

I am hoping the someone can answer a short question on ltm.

ltm installs successfully with

install.packages("ltm")


but the library command:

library(ltm)


throws this error:


library(ltm)
Error: package ‘polycor’ required by ‘ltm’ could not be found


I cannot locate polycor in the install.packages menu in RStudio.

This documentation on ltm: https://cran.r-project.org/web/packages/ltm/ltm.pdf does not mention polycor

I have used this package before without a problem, but it has been about one year since I last used it.

Thanks

Answer

You may need to update R. From CRAN polycor info it says the package depends on R>3.3.0. Additionally, this site may help.

If you are using linux, you should be able to type: R --version into a terminal to confirm which version you have

edit: though it appears my R version is 3.2.3...I may need to change my ubuntu repo

 sudo apt-cache showpkg r-base
 sudo apt-get upgrade r-base
 sudo apt-get install r-base