rollup.pct | R Documentation |
Uses data.table package to quickly calculate
ratio of a/b within each subset of a dataset (e.g., by zone).
This will be superseded by rollup()
once that is completed.
rollup.pct(a, b, zone)
a |
Required numeric vector, numerator |
b |
Required numeric vector, denominator. Same length as a. |
zone |
Optional, vector to group by. Same length as a and b. |
Returns a table with a/b calculated within each zone.
make.bin.pctile.cols()
and assign.pctiles()
pre1960=1:100; builtunits=rep(c(10, 100),50); zone=rep(c('NY','MA'),50)
rollup.pct(a,b,zone)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.