I play with the jmv package in RStudio. I was wondering if there is a way to get a nice output (i.e. publication-ready) from it with a package like gt or kable?
It is easy to get it in jamovi, it is purely a question out of curiosity.
For example, we can get a nice table from an anova test with :
Code: Select all
dummy_anova <-
ANOVA(data = chickwts,
formula = weight ~ feed,
effectSize = "omega",
homo = TRUE,
qq = TRUE,
postHoc = c("feed"),
postHocCorr = "tukey",
postHocES = "d")
as.data.frame(dummy_anova$main) %>%
gt()
as.data.frame(dummy_anova$main) %>%
kable()
But when applied to a t test, it is messy
Code: Select all
dummy_Student <-
chickwts %>%
filter(feed == "horsebean" | feed == "linseed") %>%
ttestIS(formula = weight ~ feed,
bf = TRUE,
students = TRUE,
welchs = FALSE,
mann = FALSE,
effectSize = TRUE,
qq = TRUE,
eqv = TRUE)
as.data.frame(dummy_Student$ttest) %>%
gt()
Same thing with the descriptives:
Code: Select all
stats_desc <-
descriptives(
data = chickwts,
splitBy = feed,
#on peut mettre aussi splitBy = NULL
n = TRUE,
mean = TRUE,
median = TRUE,
sd = TRUE,
variance = TRUE,
se = TRUE,
qq = TRUE,
missing = FALSE,
mode = FALSE,
sum = FALSE,
range = FALSE,
min = FALSE,
max = FALSE)
as.data.frame(stats_desc$descriptives) %>%
gt()
as.data.frame(stats_desc$descriptives) %>%
kable()
Have a nice day.