style.apa.anova: Formats a Analysis of Variance Result

Description Usage Arguments Details Value See Also Examples

View source: R/style_apa.R

Description

This style functions takes a Anova table from anova and transforms it into a formatted character vector. This function checks for model comparisons.

Usage

1
style.apa.anova(x, effect = 1)

Arguments

x

a list. First item must be a Anova table from anova. All other list items will be ignored.

effect

a numeric, specifying the effect or model comparison that should be printed. Please note that the default value of 1 is not appropriate for model comparisons.

Details

Please note that this is a internal style function. It is called from pprint and not exported to user namespace. Usually pprint determines the correct style function automatically, but you can define the style function by using the format argument of pprint (pass the name of this function without style.apa. prefix). Additionally you can pass the arguments listed in this documentation to pprint.

Argument x of this function expects a list. Be aware that you do not have to pass a list to pprint or pull.pubprint – these functions will convert your arguments. This is only necessary if you want to pass additionally information to the internal style functions (see vignette for examples).

Value

character vector with a formatted character vector.

See Also

anova

Other APA.style.functions: style.apa.bartlett, style.apa.character, style.apa.chisq, style.apa.cor.test, style.apa.df, style.apa.fisher, style.apa.ks, style.apa.numeric, style.apa.p.value, style.apa.shapiro, style.apa.summary.aovlist, style.apa.summary.lm.beta.coeff, style.apa.summary.lm.coeff, style.apa.summary.lm.equation, style.apa.summary.lm.model, style.apa.t.test

Examples

1
2
3
4
5
6
pprint(anova(lm(weight ~ Diet, data = ChickWeight)),
       format = "anova")
pprint(anova(lm(weight ~ Diet, data = ChickWeight),
             lm(weight ~ Diet + Time, data = ChickWeight)),
       format = "anova",
       effect = 2)

Example output

[1] "(\\ensuremath{F[3,574]=10.81,p\\ifmmode<\\else\\textless\\fi.001})"
[1] "(\\ensuremath{F[1,573]=1556.40,p\\ifmmode<\\else\\textless\\fi.001})"

pubprint documentation built on May 29, 2017, 2:55 p.m.