Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

as.data.frame.ls_means

Coerce ls_means Objects to data.frames


Description

Coerce ls_means Objects to data.frames

Usage

## S3 method for class 'ls_means'
as.data.frame(x, ..., add_levels = TRUE)

Arguments

x

an ls_means object.

...

currently not used.

add_levels

add term and levels columns to returned data.frame?

Author(s)

Rune Haubo B. Christensen

See Also

Examples

# Fit example model:
data("cake", package="lme4")
cake$Temp <- factor(cake$temperature, ordered = FALSE)
model <- lmer(angle ~ recipe + Temp + (1|recipe:replicate), cake)

# Extract LS-means:
head(lsm <- ls_means(model))

# Coerce LS-means objects to data.frames:
head(as.data.frame(lsm))
head(as.data.frame(lsm, add_levels=FALSE))

lmerTest

Tests in Linear Mixed Effects Models

v3.1-3
GPL (>= 2)
Authors
Alexandra Kuznetsova [aut], Per Bruun Brockhoff [aut, ths], Rune Haubo Bojesen Christensen [aut, cre], Sofie Pødenphant Jensen [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.