View source: R/identify_privacythreshold.R
identify_privacythreshold | R Documentation |
This function scans a standard query output for groups with of employees under the privacy threshold. The method consists in reviewing each individual HR attribute, and count the distinct people within each group.
identify_privacythreshold(
data,
hrvar = extract_hr(data),
mingroup = 5,
return = "table"
)
data |
A Standard Person Query dataset in the form of a data frame. |
hrvar |
A list of HR Variables to consider in the scan. Defaults to all HR attributes identified. |
mingroup |
Numeric value setting the privacy threshold / minimum group size. Defaults to 5. |
return |
String specifying what to return. This must be one of the following strings:
See |
A different output is returned depending on the value passed to the return
argument:
"table"
: data frame. A summary table of groups that fall below the
privacy threshold.
"text"
: string. A diagnostic message.
Returns a ggplot object by default, where 'plot' is passed in return
.
When 'table' is passed, a summary table is returned as a data frame.
Other Data Validation:
check_query()
,
extract_hr()
,
flag_ch_ratio()
,
flag_em_ratio()
,
flag_extreme()
,
flag_outlooktime()
,
hr_trend()
,
hrvar_count()
,
hrvar_count_all()
,
hrvar_trend()
,
identify_churn()
,
identify_holidayweeks()
,
identify_inactiveweeks()
,
identify_nkw()
,
identify_outlier()
,
identify_shifts()
,
identify_tenure()
,
track_HR_change()
,
validation_report()
## Not run:
# Return a summary table
pq_data %>% identify_privacythreshold(return = "table")
# Return a diagnostic message
pq_data %>% identify_privacythreshold(return = "text")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.