sdc_min_max | R Documentation |
Checks if calculation of extreme values comply to RDC rules. If so, function returns average min and max values according to RDC rules.
sdc_min_max( data, id_var = getOption("sdc.id_var"), val_var, by = NULL, max_obs = nrow(data), fill_id_var = FALSE )
data |
data.frame from which the descriptive statistics are calculated. |
id_var |
character The name of the id variable. Defaults to |
val_var |
character vector of value variables on which descriptive statistics are computed. |
by |
character vector of grouping variables. |
max_obs |
integer The maximum number of observations used to calculate
the minimum and maximum. Defaults to |
fill_id_var |
logical Only for very specific use cases. For example:
If Defaults to |
A list list of class sdc_min_max
with detailed information about
options, settings and the calculated extreme values (if possible).
sdc_min_max(sdc_min_max_DT, id_var = "id", val_var = "val_1") sdc_min_max(sdc_min_max_DT, id_var = "id", val_var = "val_2") sdc_min_max(sdc_min_max_DT, id_var = "id", val_var = "val_3", max_obs = 10) sdc_min_max(sdc_min_max_DT, id_var = "id", val_var = "val_1", by = "year") sdc_min_max( sdc_min_max_DT, id_var = "id", val_var = "val_1", by = c("sector", "year") )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.