| column_sums | R Documentation |
I often need to calculate the sums of the numeric columns of a
data.frame. While colSums requires the data frame
to be numeric, this is a convenience wrapper to select numeric columns only.
column_sums(x, ...)
x |
A |
... |
Arguments passed to |
A named vector of column sums (see colSums).
Other statistics:
count_groups(),
relative_difference(),
round_half_away_from_zero(),
weighted_variance()
try(colSums(iris))
column_sums(iris)
names(iris) # no column sum for `Species`
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.