I read an SPSS file and apply labels.
library (haven)
library (expss)
nps2020 <- haven::read_spss("NPS Data_2020_28 Dec 2020.sav")
nps2020 <- add_labelled_class(nps2020)
Sometimes expss can find the variables when they actually exist.
Error message -
TabANPSMeansNew<-nps2020%>%tab_cols(total(),AgeC,S22,S23,S25_2)%>%
- tab_cells(s28FEngen)%>%
- tab_stat_mean()%>%
- tab_pivot()
Error in NCOL(x) :
object 'S28.1. On a scale of 1-5, where 1 is “not safe at all” and 5 is “extremely safe”please rate the level of safety you experienced at the “ENGEN - Forecourt” of the brands you have visited over your last five visits to petrol stations?' not found
Variable s28Engen does exist but in this example expss can read it - what causes this?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…