Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R - could not find function "cld"

Tags:

r

I'm trying to apply these codes for https://rcompanion.org/rcompanion/d_08.html

my problem

library(multcompView)
> library(lsmeans)
> lsmeans = lsmeans::lsmeans ### Uses the lsmeans function
> leastsquare = lsmeans(model,
+                       "B_exp_type",
+                       adjust="tukey")
NOTE: Results may be misleading due to involvement in interactions

   > cld(leastsquare,
    +     alpha=.05, 
    +     Letters=letters)
    Error in cld(leastsquare, alpha = 0.05, Letters = letters) : 
      could not find function "cld"

how to fix this could not find function "cld" error ??

like image 301
Hutch Avatar asked May 12 '26 17:05

Hutch


1 Answers

You need to install the multcomp package.

Best advert for namespacing I've seen for a while.

like image 171
Keith McNulty Avatar answered May 14 '26 08:05

Keith McNulty