plot_twochoiceRL: Visualize behavior in a two-choice decision task

Description Usage Arguments Value Examples

View source: R/plot_twochoiceRL.R

Description

This function plots the simulated two-choice task data.

Usage

1
2
3
4
5
6
plot_twochoiceRL(
  data = NULL,
  subj = 100,
  colors = c("#009999", "#0000FF"),
  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. Defaults to static.

Value

A plot of individual subj's expected value across trials, a plot of individual subj's probability across trials, and a side-by-side plot of both of the previous plots.

Examples

1
2
3
4
5
# Save simulated task data to a variable, say, data_sim
data_sim <- simulate_twochoiceRL(trials_unique = FALSE)

# Plot the behavior of individual 100
plot_twochoiceRL(data = data_sim, subj = 100, colors = c("#009999","#0000FF"))

psuthaharan/twochoiceRL documentation built on Dec. 22, 2021, 9:56 a.m.