The 365 Data Science team is proud to invite you to our own community forum. A very well built system to support your queries, questions and give the chance to show your knowledge and help others in their path of becoming Data Science specialists.
Anybody can ask a question
Anybody can answer
The best answers are voted up and moderated by our team

Unable to load packages on R studio

Unable to load packages on R studio


I’m at the end of R programming section and currently doing hypothesis testing but unable to load packages like library(psych) , library(pastec)
please help, since im unable to use functions like describe etc without having these packages loaded up
thanks and regards,

1 Answer

365 Team

Hi Abdul, 
thanks for reaching out! Did you install the packages prior to loading them?
If you’re using a package for the first time in R, you should install it prior to using it. You can do so, by running the following code either in your console or from your script:
to install the psych package and same procedure for any remaining package which you’re using for the first time.
Keep in mind that you only need to install the package one time before you can start using it. After that you can just refer to the library(“psych”) without the need for installing it every time.
365 Eli 

Hello Eli, I am Having the same problem with Installing the psych package: install.packages(“psych”) results in the following error –> “Warning in install.packages :
dependency ‘mnormt’ is not available” –> Followed by another error message: “Warning in install.packages :
installation of package ‘psych’ had non-zero exit status” –> followed by another error message when I try to install.packages( “mnormt”) as a possible solution –> “Warning in install.packages :
package ‘mnormt’ is not available (for R version 3.6.3)” –> I then updated R to the most recent version by going to “help” –> “check for updates” –> and installed the latest version of R–> Then tried to install “psych” again– but the same errors pop up. Any guidance would be greatly appreciated!

2 months

Update, after doing more digging the problem was solved by updating R to Version 4.0.2 for mac–> “Taking off again”: –> This was confusing when checking my Rstudio for software updates and thenupdating the most recent software…BUT it did not mention 4.0 as being the most recent “version” of R, which in this scenario was the underlying problem. Nevertheless, going with the flow of: install.packages(“psych”) — > library(psych) –> describe(…) — works fine now! FYI for any Mac users with future R package installation problems.

2 months
Ready to Learn Data Science?
50% OFF