`{lavaan}` can't be installed on R < 4.1
IndrajeetPatil opened this issue · 2 comments
IndrajeetPatil commented
Although DESCRIPTION
file says R >= 3.4
, the package can't be installed on older R versions:
* installing *source* package ‘lavaan’ ...
** package ‘lavaan’ successfully unpacked and MD5 sums checked
staged installation is only possible with locking
** using non-staged installation
** R
Error in parse(outFile) :
/tmp/RtmpSuPa5f/R.INSTALL1896434aa876/lavaan/R/lav_model_h1_information.R:762:22: unexpected input
761: B1c <-
762: lapply(zb, \
^
ERROR: unable to collate and parse R files for package ‘lavaan’
It's because the package is using syntax introduced in R 4.1
:
lavaan/R/lav_model_h1_information.R
Lines 761 to 763 in cd5ec1b
yrosseel commented
Indeed. Thanks for reporting this. I will adapt the syntax, because older versions of R are still widely used.
yrosseel commented
The code has been adapted in the github version, and lavaan should run (again) with older versions
of R.