tidyverse / funs

Collection of low-level functions for working with vctrs
Other
34 stars 7 forks source link

prop #3

Open hadley opened 8 years ago

hadley commented 8 years ago

Shorter version of prop.table() with na.rm = TRUE

prop <- function(x) x / sum(x, na.rm = TRUE)