i am trying to get the descriptive statistics from multiple variables between two groups. so far the only way i could find out how to use so is using the group by then summarize function. but it is alot of work to run on all the variables see below. is there any cleaner way of doing this
grouped_summary <- my_data %>%
group_by(group) %>%
summarize(mean_var1 = mean(variable1, na.rm = TRUE),
median_var1 = median(variable1, na.rm = TRUE),
sd_var1 = sd(variable1, na.rm = TRUE),
mean_var2 = mean(variable2, na.rm = TRUE),
median_var2 = median(variable2, na.rm = TRUE),
sd_var2 = sd(variable2, na.rm = TRUE),
count = n())