qwraps2

“Error: `x` must be a formula” with qwraps2 summary_table function

时光总嘲笑我的痴心妄想 提交于 2020-06-29 03:46:15
问题 I am trying to make a table with summary statistics that looks similar to this (but with min/max/median/mean values filled in): Type Mass (g) tct tcx tht thx tct Min Max Median Mean (SD) Length (mm) Min Max Median Mean (SD) Width (mm) Min Max Median Mean (SD) Or even like this: (with a width column too) Mass (g) Length (mm) Type Min Max Median Mean (SD) Min Max Median Mean (SD) tct tcx tht thx tct Here is an example of my data: dat <- data.frame( "id" = c(01,02,03,04,05,06,07,08,09,10), "type

getting error stating “Error: `x` must be a formula”

时光总嘲笑我的痴心妄想 提交于 2020-06-28 05:42:07
问题 I am using the qwraps2 package that has the summary_table function. For some reason I am getting the error "Error: x must be a formula" when I run the code below. args(summary_table) summary_table(death_vs_gender, summaries = qsummary(death_vs_gender)) our_summary1 <- list("Table 2: Summary Statistics for Mass Shooting Deaths in American between 1966-2017 by Men & Women" = list( "n" = sum(death_vs_gender$Deaths), "Min" = ~ min(death_vs_gender$Deaths), "Max" = ~ max(death_vs_gender$Deaths),