I have a table with 3 numerical variables and 1 logical variable with 2 values.
I need to get the minimum, maximum, average, median, and 1 and 4 quartiles of all the numerical variables for both values of the logical variable.
How can I do that with a single code instead of writing a code for each variable?
Here is the df
# A tibble: 10 × 4
a b c d
<int> <int> <lgl> <int>
1 1 1 TRUE 1
2 2 2 FALSE 2
3 3 3 TRUE 3
4 4 4 FALSE 4
5 5 5 TRUE 5
6 6 6 FALSE 6
7 7 7 TRUE 7
8 8 8 FALSE 8
9 9 9 TRUE 9
10 10 10 FALSE 10
structure(list(a = 1:10, b = 1:10, c = c(TRUE, FALSE, TRUE, FALSE,
TRUE, FALSE, TRUE, FALSE, TRUE, FALSE), d = 1:10), class = c("tbl_df",
"tbl", "data.frame"), row.names = c(NA, -10L))