Learn R Programming

whatifbandit (version 0.3.0)

print.mab: Print Generic For mab

Description

Custom Print Display for objects of mab class returned by single_mab_simulation(). Prevents the large list from being printed directly, and provides useful information about the settings of each trial.

Usage

# S3 method for mab
print(x, ...)

Value

Text summary of settings used for the Multi-Arm Bandit trial.

Arguments

x

A mab class object created by single_mab_simulation().

...

Further arguments passed to or from other methods.

Details

The items used to create the text summary can be found in the settings element of the output object.

... is provided to be compatible with print(), but no other arguments change the output.

Examples

Run this code
# Running a Trial
x <- single_mab_simulation(
  data = tanf,
  algorithm = "thompson",
  assignment_method = "batch",
  period_length = 1750,
  prior_periods = "All",
  blocking = FALSE,
  whole_experiment = TRUE,
  perfect_assignment = TRUE,
  data_cols = c(
    id_col = "ic_case_id",
    success_col = "success",
    condition_col = "condition"
  )
)
print(x)

Run the code above in your browser using DataLab