event_variable: Create a continuous valued event sequence from a numeric...

View source: R/event_vector.R

event_variableR Documentation

Create a continuous valued event sequence from a numeric vector

Description

This function generates a continuous valued event sequence object from a given numeric vector. It can be used to create event sequences for continuous predictors in fMRI data analyses.

Usage

event_variable(vec, name, onsets, blockids = 1, durations = NULL)

Arguments

vec

A numeric vector representing the continuous event sequence values

name

A character string providing a name for the event sequence

onsets

A numeric vector of onsets for each event in the sequence

blockids

A numeric vector of block identifiers for each event in the sequence (default: 1)

durations

A numeric vector of durations for each event in the sequence (default: NULL)

Value

An object representing the continuous valued event sequence, with class "event_variable" and "event_seq"

See Also

EV, event_model

Examples

evar <- event_variable(c(1, 2, 3, 4, 5, 6), "example_var", onsets=seq(1, 100, length.out=6))


bbuchsbaum/fmrireg documentation built on May 16, 2023, 10:56 a.m.