I have a table of numeric variables:
| result_1|result_2|result_3|
| 3 | 11 | 9 |
| 2 | 15 | 5 |
| 14 | 3 | 2 |
| 1 | 19 | 7 |
| 3 | 3 | 9 |
I would like to return a table that shows min, max, and sum for each variable as below:
| Min | Max | Sum |
result_1| 1 | 14 | 23 |
result_2| 3 | 19 | 41 |
result_3| 2 | 9 | 32 |
I have tried using the apply family below but doesn't work
sapply(df, function(x){
return(c(min(x), max(x), sum(x))}
)