Error in semPaths(fit_SEM3) : could not find function "semPaths"

1.339 visualitzacions
Ves al primer missatge no llegit

Rim Rj

no llegida,
2 de maig 2020, 9:44:202/5/20
a lavaan
Hello all,

I am new to Structural equation modelling using R package lavaan.

I was trying to visualize the diagram of my sem model using the function semPaths from the package semPlot. However, each time and whatever the defined model is , I get the following error Error in semPaths(fit_SEM3) : could not find function "semPaths" .


What could be the reason behind this error? Thank you in advance for any help :-)


NB: I get the following message when calling the semPlot package from the library. I don't know if this could explain the problem that I'm facing?

> library(semPlot)
Error: package or namespace load failed for ‘semPlot’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 aucun package nommé ‘latticeExtra’ n'est trouvé
In addition: Warning message:
le package ‘semPlot’ a été compilé avec la version R 3.5.3 

Nickname

no llegida,
3 de maig 2020, 9:53:323/5/20
a lavaan
Rim Rj:
  I do not speak French but the last warning appears to state that semPlot was compiled using R version 3.5.3.  You could try using the R.Version() function to see what version you are using.  One strategy might be to try installing the latticeExtra package first.  If it installs properly, then try installing semPlot again.  If latticeExtra is not compatible with your version of R, you may need to update the version of R that you are using.  You will not be able to load semPlot until it installs successfully.

  The below page does not list latticeExtra as a dependency for semPlot version 1.1.2 current as of August 2019.  So, I am wondering if it might be a dependency of a dependency.  Also, the page states that semPlot only requires R version 2.15.0.  However, it may be that this does not take into consideration the requirements of the dependencies.  I am not sure how that works.

https://cran.r-project.org/web/packages/semPlot/index.html

  If the above does not resolve your issue, you may want to contact the developer directly.  This forum is focused on lavaan and semPlot is not part of lavaan.

Keith
------------------------
Keith A. Markus
John Jay College of Criminal Justice, CUNY
http://jjcweb.jjay.cuny.edu/kmarkus
Frontiers of Test Validity Theory: Measurement, Causation and Meaning.
http://www.routledge.com/books/details/9781841692203/


Rim Rj

no llegida,
4 de maig 2020, 4:40:574/5/20
a lavaan
Keith,

Thank you so much for your help. So I followed your suggestion to upgrade my current R version (since latticeExtra package was not compatable with the old version). I had the R version 3.5.3 of 2018 which I updated to R version 4.0.0 of 2020. When doing this and reinstalling the semPlot package, the function semPaths seems to work properly now.

Thanks again!
Best regards.

Rim.
Respon a tots
Respon a l'autor
Reenvia
0 missatges nous