Skip to contents

This function flags persons who have an unusual ratio of email hours to emails sent. If the ratio between Email Hours and Emails Sent is greater than the threshold, then observations tied to a PersonId is flagged as unusual.

Usage

flag_em_ratio(data, threshold = 1, return = "text")

Arguments

data

A data frame containing a Person Query.

threshold

Numeric value specifying the threshold for flagging. Defaults to 1.

return

String specifying what to return. This must be one of the following strings:

  • "text"

  • "data"

See Value for more information.

Value

A different output is returned depending on the value passed to the return

argument:

  • "text": string. A diagnostic message.

  • "data": data frame. Person-level data with those flagged with unusual ratios.

Examples

flag_em_ratio(pq_data)
#> [1] "0 % (0) of the population have an unusually high email hours to emails sent ratio."