Trial epoch, contains the following information: Block
experiment block/session string; Time trial onset within that block;
Trial trial number; Condition trial condition. Other optional
columns are Event_xxx (starts with "Event"). See
https://openwetware.org/wiki/RAVE:Epoching or more details.
Value
self$table
If event is one of "trial onset",
"default", "", or NULL, then the result will be
"Time" column; if the event is found, then return will be the
corresponding event column. When the event is not found and
missing is "error", error will be raised; default is
to return "Time" column, as it's trial onset and is mandatory.
If condition_type is one of
"default", "", or NULL, then the result will be
"Condition" column; if the condition type is found, then return
will be the corresponding condition type column. When the condition type
is not found and missing is "error", error will be raised;
default is to return "Condition" column, as it's the default
and is mandatory.
Public fields
nameepoch name, character
subjectRAVESubjectinstancedataa list of trial information, internally used
tabletrial epoch table
.columnsepoch column names, internally used
Active bindings
columnscolumns of trial table
n_trialstotal number of trials
trialstrial numbers
available_eventsavailable events other than trial onset
available_condition_typeavailable condition type other than the default
Methods
Method get_event_colname()
Get epoch column name that represents the desired event
Usage
RAVEEpoch$get_event_colname(
event = "",
missing = c("warning", "error", "none")
)Method get_condition_colname()
Get condition column name that represents the desired condition type
Usage
RAVEEpoch$get_condition_colname(
condition_type,
missing = c("warning", "error", "none")
)Examples
# Please download DemoSubject ~700MB from
# https://github.com/beauchamplab/rave/releases/tag/v0.1.9-beta
if (FALSE) { # \dontrun{
# Load meta/epoch_auditory_onset.csv from subject demo/DemoSubject
epoch <-RAVEEpoch$new(subject = 'demo/DemoSubject',
name = 'auditory_onset')
# first several trials
head(epoch$table)
# query specific trial
old_trial1 <- epoch$trial_at(1)
# Create new trial or change existing trial
epoch$set_trial(Block = '008', Time = 10,
Trial = 1, Condition = 'AknownVmeant')
new_trial1 <- epoch$trial_at(1)
# Compare new and old trial 1
rbind(old_trial1, new_trial1)
# To get updated trial table, must update first
epoch$update_table()
head(epoch$table)
} # }