View source: R/make.pctile.cols.alt2.R
make.pctile.cols.alt2 | R Documentation |
Takes a data.frame of values and returns a data.frame of percentiles, showing the percentile of a value within all values in its column.
make.pctile.cols.alt2(
raw.data.frame,
weights,
as.df = TRUE,
prefix = "pctile.",
na.rm = TRUE,
zone = NULL
)
raw.data.frame |
Data.frame of values |
weights |
Optional Numeric vector of weights to create weighted percentiles, such as population-weighted quantiles. Unweighted if not specified. Vector same length as number of rows in data.frame. |
as.df |
Optional logical TRUE by default, in which case matrix results are converted to data.frame |
prefix |
Optional character element, default is 'pctile.', provides text to paste to beginning of input data.frame column names to use as output column names. |
na.rm |
Default is TRUE. Passed to |
zone |
NULL by default, but if a vector is provided, it defines zones to group by, so percentiles are within a given zone only. |
Returns a matrix or data.frame
make.bin.pctile.cols()
and assign.pctiles()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.