Description Usage Arguments Details Value Examples
Performs a test that no value in a specified column is greater or smaller than an expected minimum and maximum value.
1 | test_column_between(df, col, min_expected, max_expected)
|
df |
A dataframe |
col |
The unquoted column name of the column you want to test |
min_expected |
The expected minimum value |
max_expected |
The expected maximum value |
This function is also good for verifying that rescaling operations have worked as expected.
The dataframe passed to the function.
1 2 3 4 5 6 7 8 | # Basic usage
test_column_between(mtcars, disp, 50, 500)
# Test a scaling operation
library(dplyr)
mtcars %>%
mutate(disp_scaled = (disp - min(disp)) / (max(disp) - min(disp))) %>%
test_column_between(disp_scaled, 0, 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.