means | R Documentation |
These functions allow easily computing means and sums. Note that if you
attach rosetta
to the search path,
means( ..., data = NULL, requiredValidValues = 0, returnIfInvalid = NA, silent = FALSE ) sums( ..., data = NULL, requiredValidValues = 0, returnIfInvalid = NA, silent = FALSE )
... |
The dataframe or vectors for which to compute the means or sums.
When passing a dataframe as unnamed argument (i.e. in the "dots", |
data |
If a dataframe is passed as |
requiredValidValues |
The number (if larger than 1) or proportion (if between 0 and 1) of values that have to be valid (i.e. nonmissing) before the mean or sum is returned. |
returnIfInvalid |
Which value to return for rows not meeting the
criterion specified in |
silent |
Whether to suppress messages. |
The means or sums.
rosetta::means(mtcars$mpg, mtcars$disp, mtcars$wt); rosetta::means(data=mtcars, 'mpg', 'disp', 'wt'); rosetta::sums(mtcars$mpg, mtcars$disp, mtcars$wt); rosetta::sums(data=mtcars, 'mpg', 'disp', 'wt');
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.