The biggest problem with using methods such as through library(broom)
library(dplyr)
library(broom)
output <- iris %>%
group_by(Species) %>%
summarise(tidy(t.test(Sepal.Width)))
Is that it produces a tibble which is essentially a glorified dataframe. I do not want a dataframe, but would prefer a summary-stats table. One method I found was to convert it to a regular dataframe and then add row names, and then use xtable to export it to latex. There is no good code for this available as far as I am aware and doing this is just inefficient in my opinion.
Another method is to use https://www.datanovia.com/en/blog/how-to-perform-t-test-for-multiple-variables-in-r-pairwise-group-comparisons/ but again, we end up with a tibble which is not ideal for exporting it to latex as I'd basically have to reformat all labels anyway.
Any other suggestions?