Function to calculate the means using Linear models (lm or aov)

means_lm(
data,
trait,
model,
comparison,
test = "SNK",
anova = FALSE,
plot_diag = FALSE,
plot_treat = NULL,
plot_groups = NULL,
tab_vars = NULL,
sep = NULL,
digits = 3
)

## Arguments

data Experimental design data frame with the factors and traits. Name of the trait. The effects in the model. See examples. Factor for the comparisons. Test comparison (default = "SNK"). Others: "TUKEY" & "DUNCAN". ANOVA table (default = FALSE). Show diagnostic plots (default = FALSE). Treat of comparison in dot plot (default = NULL). See example. Group of comparison in dot plot (default = NULL). See example. Specific the variables in the summary table (default = NULL). Separator between the variables when use tab_vars. See details. Number of digits in the table (default = 3).

## Value

A list with two objects:

1. Summary statistics.

2. Means with the mean comparisons test.

## Details

Using tab_vars select the variables shown the adjusted mean table with the sep. Mean comparison at p < 0.05.