get_bins | R Documentation |
Calculate bins. TO BE DOCUMENTED.
get_bins(
.data,
welfare,
weight,
distribution_type = c("micro", "group", "aggregate", "imputed"),
nbins = 100,
output = "simple"
)
.data |
Household survey data frame with at least a welfare variable. |
welfare |
numeric: A vector of income or consumption values. |
weight |
numeric: A vector of weights. |
distribution_type |
character: Type of distribution, either micro, group, aggregate or imputed. |
nbins |
numeric: Number of bins. |
output |
character: It has two varieties. 1) it could be a vector of
variables to retain after calculations (variables available are "welfare",
"weight", "cum_pop", "cum_prop_pop", and "bins"). 2) It could be a one of
two key words, "simple" or "full". |
data.frame
data("md_ABC_2000_income")
df <- md_ABC_2000_income
bins <- get_bins(df, welfare, weight)
str(bins)
bins <- get_bins(df, welfare, weight, output = "full")
str(bins)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.