styletests | R Documentation |
Several internal functions to style inference tests
.styleaov(dv, g, digits = 2L, pdigits = 3L)
.style2sttest(dv, g, digits = 2, pdigits = 3)
.stylepairedttest(dv, g, ID, digits = 2, pdigits = 3)
.stylepairedwilcox(dv, g, ID, digits = 2, pdigits = 3)
.stylepairedmcnemar(dv, g, ID, digits = 2, pdigits = 3)
.stylekruskal(dv, g, digits = 2, pdigits = 3)
.stylechisq(dv, g, digits = 2, pdigits = 3, simChisq = FALSE, sims = 10000)
.stylemsd(n, x, digits = 2, includeLabel = FALSE)
.stylemdniqr(n, x, digits = 2, includeLabel = FALSE)
.stylefreq(n, x)
dv |
An outcome variable |
g |
A grouping/predictor variable |
digits |
An integer indicating the number of significant digits to use.
Defaults to |
pdigits |
An integer indicating the number of digits for p values.
Defaults to |
simChisq |
A logical value, whether or not to simulate chi-square values.
Only applies to some functions. Defaults to |
sims |
An integer indicating the number of simulations to conduct.
Only applies to some functions. Defaults to |
A character string of the formatted results.
JWileymisc:::.styleaov(mtcars$mpg, mtcars$cyl)
JWileymisc:::.style2sttest(mtcars$mpg, mtcars$am)
JWileymisc:::.stylepairedttest(sleep$extra, sleep$group, sleep$ID)
JWileymisc:::.stylepairedwilcox(sleep$extra, sleep$group, sleep$ID)
## example data
set.seed(1234)
exdata <- data.frame(
ID = rep(1:10, 2),
Time = rep(c("base", "post"), each = 10),
Rating = sample(c("good", "bad"), size = 20, replace = TRUE))
JWileymisc:::.stylepairedmcnemar(exdata$Rating, exdata$Time, exdata$ID)
rm(exdata) ## cleanup
JWileymisc:::.stylekruskal(mtcars$mpg, mtcars$am)
JWileymisc:::.stylekruskal(mtcars$mpg, mtcars$cyl)
JWileymisc:::.stylechisq(mtcars$cyl, mtcars$am)
JWileymisc:::.stylemsd("Miles per Gallon", mtcars$mpg)
JWileymisc:::.stylemsd("Miles per Gallon", mtcars$mpg, includeLabel = TRUE)
JWileymisc:::.stylemdniqr("Miles per Gallon", mtcars$mpg)
JWileymisc:::.stylemdniqr("Miles per Gallon", mtcars$mpg, includeLabel = TRUE)
JWileymisc:::.stylefreq("Transmission", mtcars$am)
JWileymisc:::.stylefreq("Transmission", mtcars$am)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.