What package do I load to use the emmeans function?

I need to do a pairwise comparison using emmeans but Posit is unable to find the emmeans function. I believe I need to load a package, but I do not know which one. Here is the error I receive:

Error in emmeans(Leaf_area_lm, ~Propagation) :
could not find function "emmeans"

Can anyone advise which package to load to use the emmeans function? Last year I used the performance package, but this year I receive an error saying there is no package called performance. What has replaced the performance package?

There is an emmeans() function in the emmeans package. The description of the function says:

Compute estimated marginal means (EMMs) for specified factors or factor combinations in a linear
model; and optionally, comparisons or contrasts among them. EMMs are also known as least-
squares means.

Here is a link to the CRAN page of the package.

Thank you for your help! I have tried to load the emmeans package but I receive the following error:

Error in library(emmeans) : there is no package called ‘emmeans’

Do you know if the emmeans package been replaced by another package, and if so, what it is now called?

I just successfully installed that package with

install.packages("emmeans")

Thank you again for your help! I have now been able to instal the emmeans package. Very grateful for your quick reply!

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.