blade_params: Create a search grid

View source: R/blade_params.R

blade_paramsR Documentation

Create a search grid

Description

blade_params() takes a list of name-value pairs and sets up a grid comprising all possible combinations of these values. It also provides the optional ability to filter out certain combinations through specifying conditions.

Usage

blade_params(params, ...)

Arguments

params

A list of name-value pairs. The name will become the column name in the output.

...

Conditions to filter the grid. Optional.

Details

This function provides a wrapper around tidyr::expand_grid and then (optionally) filters it by passing on the given conditions to dplyr::filter().

Value

A tibble with one column for each input in ...., optionally filtered by the conditions, and beginning with a column identifying each test case.

Examples

params <- list(
  a = seq(1:3),
  b = 2
)
blade_params(params, a > b)

datr-studio/bladerunr documentation built on April 12, 2022, 6:19 p.m.