R/tabularise.htest.R
tabularise_default.htest.Rd
tabularise()
an htest object (into a a flextable) that can be
further post-edited..
# S3 method for class 'htest'
tabularise_default(
data,
header = TRUE,
title = NULL,
lang = getOption("SciViews_lang", "en"),
show.signif.stars = getOption("show.signif.stars", TRUE),
...,
kind = "ft",
env = parent.frame()
)
An htest object
If TRUE
(by default), add a header to the table
If TRUE
, add a title to the table header. Default to the same
value than header, except outside of a chunk where it is FALSE
if a table
caption is detected (tbl-cap
YAML entry).
The natural language to use. The default value can be set with,
e.g., options(SciViews_lang = "fr")
for French.
If TRUE
, add the significance stars
to the table. The default value is obtained from
getOption("show.signif.stars"")
.
Additional arguments (unused for now).
The kind of table to produce: "tt" for tinytable, or "ft" for flextable (default).
The environment where to evaluate lazyeval expressions (unused for now).
A flextable object you can print in different forms or rearrange with the {flextable} functions.
data(iris)
iris_cor <- cor.test(iris$Sepal.Length, iris$Sepal.Width)
tabularise::tabularise(iris_cor)
Two sided Pearson’s product-moment correlation test
Pearson’s r coefficient (CI:95%)
tobs. value
Df
Value under H0
p value
-0.1 (-0.3-0.0)
-1.44
148
0
0.152
0 <= '***' < 0.001 < '**' < 0.01 < '*' < 0.05
tabularise::tabularise(t.test(x = 1:10, y = 7:20), lang = "fr")
Test t bilatéral d’indépendance à variances inégales (Welch)
Différence des moyennes (IC:95%)
Valeur de tobs.
Ddl
Valeur sous H0
Valeur de p
-8.0 (-11.1--4.9)
-5.43
22
0
1.86·10-05
***
0 <= '***' < 0.001 < '**' < 0.01 < '*' < 0.05