expss

expss - Exporting many tables to MS Excel

孤人 提交于 2019-12-11 17:43:12
问题 I have read up on this in the article "expss - Tables with labels in R". Using the example supplied I can export 1 table to Excel. But I want to export many tables, all run at the same time. Can someone give me some pointers on how to export many tables at the same time. Regards 回答1: The simplest way is to put all your tables in the list. Then you can export this list to Excel. Example: library(expss) library(openxlsx) data(mtcars) mtcars = apply_labels(mtcars, mpg = "Miles/(US) gallon", cyl

expss R set_caption() not outputting to Excel

最后都变了- 提交于 2019-12-11 16:38:18
问题 Yesterdays print output to Excel script you sent me basically working well. One issue though. I use set_caption() a lot as my clients want the full question wording above each table [the reference to the variable label isn't enough]. When I use set_caption() the Console version shows it correctly, but when I export it to Excel [via the function you sent yesterday] the tables with set_caption() aren't outputted to Excel. I have tried adding %>% set_caption(xxx) in both the cro and longer piped

Conditional Cross tabulation in R

99封情书 提交于 2019-12-10 15:56:13
问题 Looking for the quickest way to achieve below task using "expss" package. With a great package of "expss", we can easily do cross tabulation (which has other advantage and useful functions for cross-tabulations.), we can cross-tabulate multiple variables easily like below. #install.packages("expss") library("expss") data(mtcars) var1 <- "vs, am, gear, carb" var_names = trimws(unlist(strsplit(var1, split = ","))) mtcars %>% tab_prepend_values %>% tab_cols(total(), ..[(var_names)]) %>% tab