| Subject | R Documentation |
contains subject meta information after preprocessing.
metaenvironment stores subject meta data
subject_idcharacter, subject ID, generated from project name
and subject code. For example, project name is "congruency" and
subject code is "YAB", then the subject_id="congruency/YAB"
subject_codeidentifier for subject
project_nameproject name
dirsstores folder paths for subject data
is_strictwhether preprocess directory is checked when initializing the instance
electrodeselectrode table (read-only)
frequenciesfrequency table (read-only)
time_pointstime-point table (read-only)
time_excluded(deprecated) excluded time-point table (read-only)
sample_ratetime-point table (read-only, for compatibility issues)
volt_sample_ratevoltage (trace) sampling rate in Hertz (read-only)
power_sample_ratepower (amplitude) sampling rate in Hertz (read-only)
phase_sample_ratephase sampling rate in Hertz (read-only)
valid_electrodesall valid electrodes in current reference scheme (read-only)
idread-only version of subject ID
info()print the information of the subject
Subject$info()
none
print()override of default print method
Subject$print(...)
...ignored
default memory address of the environment
finalize()called when garbage collected
Subject$finalize()
new()constructor
Subject$new(project_name, subject_code, reference = NULL, strict = TRUE)
project_nameproject name
subject_codesubject code
referencewhat kind of reference is default for the subject,
default is "default", referring to "reference_default.csv" in
subject meta folder
strictwhether to check if the raw folder exists
preprocess_info()Obtain preprocessing information. This methods is rarely directly called, I wrap up most commonly used fields in other functions
Subject$preprocess_info(key, default = NULL, customized = FALSE)
keythe fields or items store in SubjectInfo2
instance
defaultdefault value if the key is not found
customizedindicates whether the key refers to additional items
or fields in SubjectInfo2. Default is false, meaning
the key is the fields.
the preprocess information correspond to the key
filter_all_electrodes()filter, and returns existing electrodes
Subject$filter_all_electrodes(electrodes)
electrodesinteger vector
the electrodes that the subject has, including bad, or invalid electrodes.
filter_valid_electrodes()filter, and returns valid electrodes
Subject$filter_valid_electrodes(electrodes)
electrodesinteger vector
the valid electrodes. Invalid electrodes refers to bad
electrodes, or the end of bipolar reference. If "Reference"
column is blank in the reference file, then the electrode is invalid.
has_bad_time_point()(deprecated) check whether the selected time is excluded
Subject$has_bad_time_point(block, electrode, start, end)
blockblock name
electrodeelectrode number
startstart time
endend time
clone()The objects of this class are cloneable with this method.
Subject$clone(deep = FALSE)
deepWhether to make a deep clone.
Zhengjia Wang
## Not run:
# Load subject, use `strict=FALSE` if not sure the existence of raw files
subject <- Subject$new(project_name = 'demo', 'YAB', strict = FALSE)
# Filter 1:14 to see which numbers refer to the valid electrodes
subject$filter_valid_electrodes(1:14)
#> [1] 13 14
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.