statify {desctable} R Documentation

## Transform any function into a valid stat function for the table

### Description

Transform a function into a valid stat function for the table

### Usage

statify(x, f)


### Arguments

 x A vector f The function to try to apply, or a formula combining two functions

### Details

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.

### Value

The results for the function applied on the vector, compatible with the format of the result table

[Package desctable version 0.3.0 Index]