Closed ericpgreen closed 5 years ago
Yes, definitely.
library(furniture)
nhanes_2010 %>%
group_by("Overweight" = overweight) %>% # grouping variable
table1("Age [Mean (SD)]" = age, # list of variables with their corresponding labels
"Health" = gen_health,
"Sex" = gender,
"Cancer" = cancer,
"Asthma" = asthma,
test = TRUE, # test relationship between grouping variable and each row variable
output = "latex2",
type = "condense") # put things on same row
will produce that table.
This is so good.
We're getting down to publication level pickiness here, but I'll ask anyway.
Thanks!
Ah man... That's a bug. It should be centered just above the grouping levels, not the total column. Give me a bit to see if I can fix that really quick.
Also, there aren't any built in arguments for landscape but it should work with the LaTeX landscape environment (e.g. using the landscape environment, printing the table and then closing the landscape environment).
Should work now in the latest developmental version of furniture.
I'm interested in trying to replicate something like this table.
Specifically: