I am BRAND NEW to R and am running into a problem. I have a dataset in SPSS that I ran an EFA (PAF) in successfully. Parallel analysis suggests no more than 7 factors but the scree plot suggests less.A supervisor of mine recommended I use R to get fit statistics on the factor analysis to help determine the best factor solution.
So, I downloaded R and RStudio onto my old Mac (intel).I imported my SPSS file into RStudio and that seemed to work fine actually.
I was following a guide that recommended putting in the following code:
itemdata<-SPSS_Reversed_Mah_Final[,c(14:95)]
str(itemdata)
install.packages(“EFA.dimensions”)
install.packages(“psych”)
library(EFA.dimensions)
library(psych)
My columns seemed to come up correctly and the psych package seemed to work. But, I’m getting the following error for the EFA. dimensions:
library(EFA.dimensions)
Error: package or namespace load failed for ‘EFA.dimensions’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
there is no package called ‘vegan’
I tried searching online but couldn’t find anything that made sense to me. I also tried quitting R and reopening/retrying everything I’ve done so far but that didn’t work either. I also tried going straight to the packages and checking it there (which gave me the same error). I tried looking fora package that says “vegan” to install but that wasn’t available in the package list. And,updated the packages
this is the version of RStudio I’m using: Version 2024.04.1+748 (2024.04.1+748)
this s the version of R I’m using: R version 4.4.0 (2024-04-24) — “Puppy Cup”
my Macis old- macOS Monterey version 12.7.5; processor uses intel core i7 but it is up to date.
It would be amazing if someone could give guidance. I’m ultimately trying to run a FA using PAF fixed to 2 through 7 factors to get fit statistics (to help determine the factor structure).
Kiersten is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.