inline_ttest | R Documentation |
Output results of a t-test as a single string to be formatted inline by knitr
inline_ttest(ttest, effsize = NULL, sig = 3)
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. |
A character vector with 1 element.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.