Transform a function into a valid stat function for the table
statify(x, f)
A vector
The function to try to apply, or a formula combining two functions
The results for the function applied on the vector, compatible with the format of the result table
NA values are removed from the data
Applying the function on a numerical vector should return one value
Applying the function on a factor should return nlevels + 1 value, or one value per factor level
See parse_formula
for the usage for formulaes.