I'm encountering the error "Error in initializePtr(): function 'chm_factor_ldetL2' not provided by package 'Matrix'" when using the 'lmer()' function from the 'lme4' package in R. I've tried reinstalling the 'Matrix' package and updating all packages, but the error persists. Any suggestions on how to resolve this would be appreciated. Thank you!
My codes are:
library(lme4)
model <- lmer(Weight ~ Age + (1 | Subjects), data = datafm12)
Additional Information:
R version: 4.3.3
Operating system: Windows 11 Pro