As part of my exploratory work I have built a function that provides a variety of metrics for each field in my dataset. I want to apply it to each column of my dataset.
library(tidyverse)
mtcars %>%summarise_all(., .funs = funs(mean, median, sd, max, min, n_distinct))
However, this results a dataset with 1 row and each function/column combination as a column. The names are also concatenated like 'column_function'.
DESIRED result would be a 'tidy' format like:
ORIGINAL_COLUMN_NAME | FUNCTION | RESULT
I'm guessing there has to be an easy way to do this?