Learn R Programming

grizbayr (version 1.3.5)

validate_input_df: Validate Input DataFrame

Description

Validates the input dataframe has the correct type, correct required column names, that the distribution is valid, that the column types are correct, and that the column values are greater than or equal to 0 when they are numeric.

Usage

validate_input_df(input_df, distribution)

Value

Bool TRUE if all checks pass.

Arguments

input_df

Dataframe containing option_name (str) and various other columns depending on the distribution type. See vignette for more details.

distribution

String of the distribution name

Examples

Run this code
input_df <- tibble::tibble(
   option_name = c("A", "B"),
   sum_clicks = c(1000, 1000),
   sum_conversions = c(100, 120)
)
validate_input_df(input_df, "conversion_rate")

Run the code above in your browser using DataLab