powered by
Compute Relative Concentration
ds_rel_conc(.data, .cols, .name)rel_conc(..., .data = dplyr::across(everything()))
rel_conc(..., .data = dplyr::across(everything()))
a tibble or numeric vector if .name missing
tibble with sf geometry
tidy-select Columns to compute the measure with. Must be at least 2 columns. If more than 2, treats first column as first group and sum of other columns as second.
tidy-select
name for column with relative concentration. Leave missing to return a vector.
arguments to forward to ds_rel_conc from rel_conc
data('de_county') ds_rel_conc(de_county, c(pop_black, starts_with('pop_'))) ds_rel_conc(de_county, c(pop_black, starts_with('pop_')), 'rel_conc')
Run the code above in your browser using DataLab