Description Usage Arguments Value Examples
View source: R/plot_bandit2arm.R
This function plots the simulated two-armed bandit task data.
1 2 3 4 5 6 | plot_bandit2arm(
data = bandit2arm_data,
subj = 100,
colors = c("orange", "purple"),
plot.type = "static"
)
|
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 |
A plot of individual subj
behavior data.
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"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.