plot_bandit2arm: Plot simulated task data

Description Usage Arguments Value Examples

View source: R/plot_bandit2arm.R

Description

This function plots the simulated two-armed bandit task data.

Usage

1
2
3
4
5
6
plot_bandit2arm(
  data = bandit2arm_data,
  subj = 100,
  colors = c("orange", "purple"),
  plot.type = "static"
)

Arguments

data

simulated task data

subj

subject data to plot. Defaults to subject 100.

colors

color to represent the two choices - choice A or choice B. Defaults to orange for choice A and purple for choice B.

plot.type

produce either static or animated version of the plot

Value

A plot of individual subj behavior data.

Examples

1
2
3
4
5
# Save simulated task data to a variable, say, data
bandit2arm_data <- simulated_bandit2arm(trials.unique = FALSE)

# Plot the behavior of individual 34
plot_bandit2arm(data = bandit2arm_data, subj = 34, colors = c("lightblue","green"))

psuthaharan/bandit2arm documentation built on Jan. 26, 2021, 1:36 a.m.