I had same problems. The solution is, as mentioned previously, to load: library(multcomp) . However, still it isn't enough. Together with it you need to upload also:
library(mvtnorm) library(survival) library(TH.data) library(MASS)
Then, cld will work!