Prints diagnostic data about the data query to the R console, with information such as date range, number of employees, HR attributes identified, etc.

check_query(data, return = "message", validation = FALSE)

Arguments

data

A person-level query in the form of a data frame. This includes:

  • Standard Person Query

  • Ways of Working Assessment Query

  • Hourly Collaboration Query

All person-level query have a PersonId column and a Date column.

return

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

  • "message" (default)

  • "text"

See Value for more information.

validation

Logical value to specify whether to show summarized version. Defaults to FALSE. To hide checks on variable names, set validation to TRUE.

Value

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

argument:

  • "message": a message is returned to the console.

  • "text": string containing the diagnostic message.

Details

This can be used with any person-level query, such as the standard person query, Ways of Working assessment query, and the hourly collaboration query. When run, this prints diagnostic data to the R console.

Examples

check_query(sq_data)
#> 
#> The data used is a Person Query
#> 
#> There are 1034 employees in this dataset.
#> 
#> Date ranges from 2019-11-03 to 2020-01-26.
#> 
#> Unique identifiers include: `Domain` is CONTOSO.COM; `IsInternal` is TRUE; `Region` is US; `TimeZone` is Pacific Standard Time
#> 
#> There are 4 (estimated) HR attributes in the data:
#> `FunctionType`, `LevelDesignation`, `Organization`, `IsActive`
#> 
#> There are 1034 active employees out of all in the dataset.
#> 
#> Variable name check:
#> 
#> `Collaboration_hours` is used instead of `Collaboration_hrs` in the data.
#> 
#> `Instant_Message_hours` is used instead of `Instant_message_hours` in the data.