Description Usage Arguments Examples
A function that calculates the mean if given numerical values. If passed a vector of factors, it checks if the levels are all the same and returns that level, otherwise it can't average factor levels and errors out.
1 | safe_mean(x)
|
x |
a vector of numerical, logical, or factors |
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.