Learn R Programming

whatifbandit (version 0.3.0)

cols: Column arguments shared across functions

Description

Topic holding common arguments across many functions. Used to expedite documentation, through inheritParams tag from roxygen2.

Arguments

id_col

Column in data; contains unique ID as a key.

success_col

Column in data; binary successes from the original experiment.

condition_col

Column in data; original treatment condition for each observation.

date_col

Column in data; contains original date of event/trial. Only necessary when assigning by "Date". Must be of type Date, not a character string.

month_col

Column in data; contains month of treatment. Only necessary when time_unit = "Month", and when periods should be determined directly by the calendar months instead of month based time periods. This column can be a string/factor variable with the month names or numeric with the month number. It can easily be created from your date_col via lubridate::month(data[[date_col]]) or format(data[[date_col]], "%m").

success_date_col

Column in data; contains original dates each success occurred. Only necessary when perfect_assignment = FALSE. Must be of type Date, not a character string.

assignment_date_col

Column in data; contains original dates treatments were assigned to observations. Only necessary when perfect_assignment = FALSE. Used to simulate imperfect information on the part of researchers conducting an adaptive trial. Must be of type Date, not a character string.