| RAVEEpoch | R Documentation |
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.
self$table
nameepoch name, character
subjectRAVESubject instance
dataa list of trial information, internally used
tabletrial epoch table
.columnsepoch column names, internally used
columnscolumns of trial table
n_trialstotal number of trials
trialstrial numbers
new()constructor
RAVEEpoch$new(subject, name)
subjectRAVESubject instance or character
namecharacter, make sure "epoch_<name>.csv" is in meta
folder
trial_at()get ith trial
RAVEEpoch$trial_at(i, df = TRUE)
itrial number
dfwhether to return as data frame or a list
update_table()manually update table field
RAVEEpoch$update_table()
set_trial()set one trial
RAVEEpoch$set_trial(Block, Time, Trial, Condition, ...)
Blockblock string
Timetime in second
Trialpositive integer, trial number
Conditioncharacter, trial condition
...other key-value pairs corresponding to other optional columns
clone()The objects of this class are cloneable with this method.
RAVEEpoch$clone(deep = FALSE)
deepWhether to make a deep clone.
# Please download DemoSubject ~700MB from
# https://github.com/beauchamplab/rave/releases/tag/v0.1.9-beta
## Not run:
# 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)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.