"RLANG" error in lavaan CFA

93 views
Skip to first unread message

Agnieszka Ewa Łyś

unread,
Nov 20, 2019, 9:51:18 PM11/20/19
to lavaan
Hi, I am trying to perform a CFA. I am using a script from previous year and this script worked perfectly a year ago but now something has changed- I have seen several times a statement "there is no package called 'rlang'" which is strange because there is no such a package mentioned in the script. This error occurs also when I am trying to import dataset thus R does not show any results of CFA because it doesn't see the data. Do you have any idea how to deal with this problem?

Mauricio Garnier-Villarreal

unread,
Nov 20, 2019, 11:28:53 PM11/20/19
to lavaan

We need more information and details. Please share the syntax and error that produce the error and the output from sessioninfo()

Christopher Desjardins

unread,
Nov 21, 2019, 7:07:04 AM11/21/19
to lav...@googlegroups.com
rlang is a package that you can install. 

install.packages(“rlang”)
library(“rlang”)

However, as far as I know, lavaan doesn’t depend on this package. So this isn’t a lavaan problem but R. 

Something else in your r script does (tidyverse stuff? tibbles? dplyr?)

On Nov 20, 2019, at 11:28 PM, Mauricio Garnier-Villarreal <mauga...@gmail.com> wrote:



We need more information and details. Please share the syntax and error that produce the error and the output from sessioninfo()



On Wednesday, November 20, 2019 at 8:51:18 PM UTC-6, Agnieszka Ewa Łyś wrote:
Hi, I am trying to perform a CFA. I am using a script from previous year and this script worked perfectly a year ago but now something has changed- I have seen several times a statement "there is no package called 'rlang'" which is strange because there is no such a package mentioned in the script. This error occurs also when I am trying to import dataset thus R does not show any results of CFA because it doesn't see the data. Do you have any idea how to deal with this problem?

--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/817258e4-62ab-4b95-a67a-912490578187%40googlegroups.com.

Agnieszka Ewa Łyś

unread,
Nov 21, 2019, 8:59:31 AM11/21/19
to lav...@googlegroups.com
Thank you for your replies. I have tried to install the "rlang" but the error still occurs. The syntax is:
setwd("C:/Users/CEM/Documents/wielość Ja/art skala pluralizmu/wyniki.sav")
library(sjPlot)
library(probemod)
library(lavaan)
library(jtools)
library(mediation)
library(broom)
library(QuantPsyc)
library(processr)
library(foreign)
library(ggplot2)
#install.packages("effects")
library(effects)
#install.packages("aod")
library(aod)
library(graphics)
#install.packages("ResourceSelection")
library(ResourceSelection)
#install.packages("pROC")
library("pROC")
install.packages("semPlot")
library("semPlot")
SPS.CFA<-'F1=~SPS02+
SPS03+
SPS04k+
SPS05+
SPS06+
SPS07k+
SPS09+
SPS11k+
SPS12+
SPS13+
SPS14+
SPS15k+
'
bootstrap=1000L
fit<-cfa(SPS.CFA,data=results,estimator="MLR")
summary(fit,fit.measures=TRUE)
and the error is:
Error: package or namespace load failed for ‘semPlot’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called 'rlang'
and:
  object 'results' not found

When I am trying to import the data from SPSS the statement  "there is no package called 'rlang'" appears again.

You received this message because you are subscribed to a topic in the Google Groups "lavaan" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lavaan/HsBkEOnrMVE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lavaan+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/86A27EF3-D862-4C78-925B-5A0555B62FDC%40gmail.com.

Agnieszka Ewa Łyś

unread,
Nov 21, 2019, 9:00:47 AM11/21/19
to lavaan
When I am trying to import the data from SPSS the statement  "there is no package called 'rlang'" appears again.

W dniu czwartek, 21 listopada 2019 13:07:04 UTC+1 użytkownik Christopher Desjardins napisał:
rlang is a package that you can install. 

install.packages(“rlang”)
library(“rlang”)

However, as far as I know, lavaan doesn’t depend on this package. So this isn’t a lavaan problem but R. 

Something else in your r script does (tidyverse stuff? tibbles? dplyr?)

On Nov 20, 2019, at 11:28 PM, Mauricio Garnier-Villarreal <mauga...@gmail.com> wrote:



We need more information and details. Please share the syntax and error that produce the error and the output from sessioninfo()



On Wednesday, November 20, 2019 at 8:51:18 PM UTC-6, Agnieszka Ewa Łyś wrote:
Hi, I am trying to perform a CFA. I am using a script from previous year and this script worked perfectly a year ago but now something has changed- I have seen several times a statement "there is no package called 'rlang'" which is strange because there is no such a package mentioned in the script. This error occurs also when I am trying to import dataset thus R does not show any results of CFA because it doesn't see the data. Do you have any idea how to deal with this problem?

--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lav...@googlegroups.com.

Christopher David Desjardins

unread,
Nov 21, 2019, 9:03:09 AM11/21/19
to lavaan

This line:

Error: package or namespace load failed for ‘semPlot’ in loadNamespace(j  <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there  is no package called 'rlang'

means rlang has not been installed. What happens when you just type:

install.packages("rlang")
library(rlang)

Make sure to close R before you run this commands and then reopen R.

Also you can read in data with foreign instead of haven

spss.dat <- foreign::read.spss("name_of_dataset.sav", to.data.frame = TRUE)

Agnieszka Ewa Łyś

unread,
Nov 21, 2019, 11:25:04 AM11/21/19
to lavaan
I have no idea why lack of "rlang" was a problem but I installed "rlang" and now it's ok. Thank you!
To unsubscribe from this group and stop receiving emails from it, send an email to lav...@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "lavaan" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lavaan/HsBkEOnrMVE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lav...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lav...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages