Description Usage Arguments Examples
Basic Statistics by Group
1 | basic_stats(data, x, y, f)
|
data |
a dataframe |
x |
the variable name you want to caculate on |
y |
the variable name group by, which shoule be a categorical variable |
f |
the basic r function you want to use to perform on the x variable |
1 2 3 4 5 6 7 | ## Continues variable stats
basic_stats(sleepdata, "Weight", "DayType", max)
basic_stats(sleepdata, "Weight", "DayType", mean)
basic_stats(sleepdata, "Weight", "DayType", median)
## Categorical variable stats
basic_stats(sleepdata, "HavingDog", "DayType", table)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.