Packages error in Rmarkdown

Dear Community,

I have all neceesary packages in my R library. All junks also runs properly. But, when I try to knit my file into PDF then following error occurs:
Quitting from lines 15-1254 (asmat.Rmd)
Error in lsmeans(plant_height.rlm, ~soil_app, adjust = "tukey") :
could not find function "lsmeans"
Calls: ... handle -> withCallingHandlers -> withVisible -> eval -> eval
Execution halted
Please guide in the matter.


Hi @Khurram,
The error message says that the lsmeans() function cannot be found. This implies that the VCA package has not been installed or has not been loaded.
Remember that the .Rmd file must still include the line


before the lsmeans() function is used.


1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.