Search code examples
r

R - could not find function "cld"


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 ??


Solution

  • You need to install the multcomp package.

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