Open AlexSananka opened 7 years ago
Actually, I've seen that when the grouping variable is a factor it does give nice titles for the tables using the values, which is great. However, now I get quite strange headers for the variables in the tables. Example:
dat <- data.frame(x = rep(1:5, 4), y = rep(c("a", "b", "c", "d"), 5), z = rnorm(20), f = factor(rep(1:2,10)))
dat %>% select(x, y, f) %>% group_by(f) %>% sjtab(fun="xtab")
Any idea why this is happening?
I think this is one of the next greater revisions that need to be done: revising the table (and plot) functions for descriptives / frequencies...
Yes! It would be really appreciated to count with a function for descriptives that combines sjmisc::frq
, group_by()
and summarise()
(d.h., mean/SD calculations for continuous variables).
Yes! It would be really appreciated to count with a function for descriptives that combines sjmisc::frq, group_by() and summarise() (d.h., mean/SD calculations for continuous variables).
Not sure, but isn't sjmisc::descr()
doing that, if I understood right?
sjtab
displays tables really nicely when the data has variable and value labels. However, when I use a data frame without column labels the headers are not very clear. Example:Also, I think because my grouping factor has no value labels, I don't get any titles on the different tables.
I know that these were mainly designed for labelled data but is it possible that if there are no labels it could use the column names and values by default to produce the headers and titles?