define_rectangle: Reshape the controller data to be plotted in ggplot2

define_rectangleR Documentation

Reshape the controller data to be plotted in ggplot2

Description

Given a table containing when several stimulus turned on/off during an experiment, and a piece of stimulus, prepare_shape_data will generate a table with one row per corner in a rectangle encompassing all the area of the plot where the stimulus is active This is given by its side (X axis) and the time when it was on (Y axis) If the stimulus was turned on/off n times, we get n rectangles and thus n*4 rows.#' The x axis is assumed to go from -1 to 1. To scale it, see scale_shape

Usage

define_rectangle(controller_data, stimulus)

Arguments

controller_data

data.frame with recordings of IDOC status at several timepoints, one timepoint per row. Wide format

stimulus

Namew of stimulus or event, which should match a column in the passed controller_data


shaliulab/idocr documentation built on June 1, 2025, 4:59 p.m.