Learn R Programming

sjPlot (version 2.0.0)

sjt.grpmean: Summary of grouped means as HTML table

Description

Computes mean, sd and se for each sub-group (indicated by var.grp) of var.cnt and prints the result as HTML table.

Usage

sjt.grpmean(var.cnt, var.grp, weight.by = NULL, value.labels = NULL,
  digits = 2, digits.summary = 3, CSS = NULL, encoding = NULL,
  file = NULL, use.viewer = TRUE, no.output = FALSE,
  remove.spaces = TRUE)

Arguments

Value

Invisibly returns a list with
  • the data frame with the description information (df),
  • the web page style sheet (page.style),
  • the web page content (page.content),
  • the complete html-output (output.complete) and
  • the html-table with inlin-css for use with knitr (knitr)
for further use.

Details

This function performs a One-Way-Anova with var.cnt as dependent and var.grp as independent variable, by calling lm(var.cnt ~ as.factor(var.grp)), to get p-values for each sub-group and the complete "model". Thus, p-values indicate whether each group-mean is significantly different from the reference group (reference level of var.grp). Statistics like mean values are based on subsetted groups (i.e. var.cnt is divided into sub-groups indicated by var.grp). Furthermore, see 'Details' in sjt.frq.

See Also

sjp.aov1

Examples

Run this code
library(sjmisc)
data(efc)
sjt.grpmean(efc$c12hour, efc$e42dep)

Run the code above in your browser using DataLab