produce a flextable describing an object oof class htest.

# S3 method for htest
as_flextable(x, ...)

Arguments

x

htest object

...

unused argument

Illustrations

See also

Examples

if(require("stats")){ M <- as.table(rbind(c(762, 327, 468), c(484, 239, 477))) dimnames(M) <- list(gender = c("F", "M"), party = c("Democrat","Independent", "Republican")) ft_1 <- as_flextable(chisq.test(M)) ft_1 }
#> a flextable object. #> col_keys: `statistic`, `p.value`, `parameter`, `method` #> header has 1 row(s) #> body has 1 row(s) #> original dataset sample: #> statistic p.value parameter method #> X-squared 30.07015 2.953589e-07 2 Pearson's Chi-squared test