inline_ttest: Output results of a t-test as a single string to be formatted...

View source: R/knitr_utils.R

inline_ttestR Documentation

Output results of a t-test as a single string to be formatted inline by knitr

Description

Output results of a t-test as a single string to be formatted inline by knitr

Usage

inline_ttest(ttest, effsize = NULL, sig = 3)

Arguments

effsize

Include a user-supplied effect size (default = NULL)

sig

The number of signficant digits for the output.

formula

Specify t-test using standard formula interface.

data

A data frame containing the variables in formula.

Value

A character vector with 1 element.

Examples

data(mtcars)
m1 <- lm(mpg ~ hp, mtcars)
m2 <- lm(mpg ~ wt, mtcars)
mnms <- c('MPG vs HP', 'MPG vs Weight')
vnms <- c('Miles per gallon'=mpg, 'Horsepower'=hp, 'Weight'=wt)
out <- forestplot(m1, m2, modelsnames=mnms, varnames=vnms)

grasshoppermouse/hagenutils documentation built on Dec. 6, 2024, 8:31 p.m.