зеркало из https://github.com/microsoft/wpa.git
58 строки
1.7 KiB
R
58 строки
1.7 KiB
R
% Generated by roxygen2: do not edit by hand
|
|
% Please edit documentation in R/flag_extreme.R
|
|
\name{flag_extreme}
|
|
\alias{flag_extreme}
|
|
\title{Warn if a certain metric exceeds an arbitrary threshold}
|
|
\usage{
|
|
flag_extreme(data, metric, person = TRUE, threshold, return = "message")
|
|
}
|
|
\arguments{
|
|
\item{data}{A Standard Person Query dataset in the form of a data frame.}
|
|
|
|
\item{metric}{A character string specifying the metric to test.}
|
|
|
|
\item{person}{A logical value to specify whether to calculate person-averages.
|
|
Defaults to TRUE (person-averages calculated).}
|
|
|
|
\item{threshold}{Numeric value specifying the threshold for flagging.}
|
|
|
|
\item{return}{A character string specifying what to return.}
|
|
}
|
|
\description{
|
|
This is used as part of data validation to check if there are extreme values
|
|
in the dataset.
|
|
}
|
|
\examples{
|
|
# The threshold values are intentionally set low to trigger messages.
|
|
flag_extreme(sq_data, "Email_hours", threshold = 15)
|
|
|
|
# Return a summary table
|
|
flag_extreme(sq_data, "Email_hours", threshold = 15, return = "table")
|
|
|
|
# Person-week level
|
|
flag_extreme(sq_data, "Email_hours", person = FALSE, threshold = 15)
|
|
|
|
|
|
}
|
|
\seealso{
|
|
Other Data Validation:
|
|
\code{\link{check_query}()},
|
|
\code{\link{flag_ch_ratio}()},
|
|
\code{\link{flag_em_ratio}()},
|
|
\code{\link{flag_outlooktime}()},
|
|
\code{\link{hrvar_count_all}()},
|
|
\code{\link{hrvar_count}()},
|
|
\code{\link{identify_holidayweeks}()},
|
|
\code{\link{identify_inactiveweeks}()},
|
|
\code{\link{identify_nkw}()},
|
|
\code{\link{identify_outlier}()},
|
|
\code{\link{identify_privacythreshold}()},
|
|
\code{\link{identify_query}()},
|
|
\code{\link{identify_tenure}()},
|
|
\code{\link{remove_outliers}()},
|
|
\code{\link{subject_validate_report}()},
|
|
\code{\link{subject_validate}()},
|
|
\code{\link{track_HR_change}()}
|
|
}
|
|
\concept{Data Validation}
|