View source: R/make.pctile.cols.R
make.pctile.cols | R Documentation |
Takes values (vector, matrix, or data.frame) and returns percentiles, showing the percentile of a value within all values in its column.
make.pctile.cols(
values,
weights = 1,
prefix = "pctile.",
as.df = TRUE,
zone = NULL
)
values |
Data.frame, matrix, or vector of values. One column at a time is analyzed using |
weights |
Optional numeric vector of weights (default is unweighted) to create weighted percentiles, such as population-weighted quantiles. Unweighted if not specified. Vector same length as number of rows in values parameter (or elements if vector). |
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. |
as.df |
Optional logical TRUE by default, in which case matrix results are converted to data.frame |
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.