leval | R Documentation |
Evaluates a set of Luna commands for the current attached dataset
leval(command)
command |
a single string or character vector of
Luna commands,
or the return value of |
a list of data-frames, in which list items are commands and sub-items
are output strata, i.e. a similar organization to
destrat output
(lout
) databases.
The lx()
function is designed to facilitate working with these lists.
ach time lunaC (the command-line version of Luna) is run, it is applied
to a "fresh" version of the data, i.e. the EDF on disk. In contrast, leval()
statements within the same R session will have cumulative effects on the
internal EDF, which will persist until either lrefresh()
is
called to re-attach a "fresh" version of the data, or it is dropped
(with ldrop()
), or a different EDF is attached
(with lattach()
or ledf()
).
## Not run:
## estimate the PSD for all N2 epochs (for tutorial individual nsrr02)
## this performs exactly the same set of operations as the following command-line lunaC statement
## % luna s.lst 2 -o out.db -s "EPOCH & MASK ifnot=NREM2 & RE & PSD sig=EEG epoch spectrum"
> k <- leval( "EPOCH & MASK ifnot=NREM2 & RE & PSD epoch spectrum sig=EEG" )
> str(k)
List of 4
$ EPOCH:List of 1
..$ BL:'data.frame': 1 obs. of 3 variables:
.. ..$ DUR: num 30
.. ..$ INC: num 30
.. ..$ NE : num 399
$ MASK :List of 1
..$ EPOCH_MASK:'data.frame': 1 obs. of 7 variables:
.. ..$ EPOCH_MASK : chr "NREM2"
.. ..$ N_MASK_SET : num 0
.. ..$ N_MASK_UNSET: num 0
.. ..$ N_MATCHES : num 399
.. ..$ N_RETAINED : num 399
.. ..$ N_TOTAL : num 399
.. ..$ N_UNCHANGED : num 399
$ PSD :List of 4
..$ CH :'data.frame': 1 obs. of 2 variables:
.. ..$ CH: chr "EEG"
.. ..$ NE: num 399
..$ B_CH :'data.frame': 10 obs. of 4 variables:
.. ..$ B : chr [1:10] "ALPHA" "BETA" "DELTA" "FAST_SIGMA" ...
.. ..$ CH : chr [1:10] "EEG" "EEG" "EEG" "EEG" ...
.. ..$ PSD : num [1:10] 15.65 5.12 108.24 3.08 5.4 ...
.. ..$ RELPSD: num [1:10] 0.0709 0.0232 0.4903 0.0139 0.0245 ...
..$ CH_F :'data.frame': 41 obs. of 3 variables:
.. ..$ CH : chr [1:41] "EEG" "EEG" "EEG" "EEG" ...
.. ..$ F : num [1:41] 0 0.25 0.75 1.25 1.75 2.25 2.75 3.25 3.75 4.25 ...
.. ..$ PSD: num [1:41] 15.2 77.7 70.6 45.9 37.4 ...
..$ B_CH_E:'data.frame': 3990 obs. of 5 variables:
.. ..$ B : chr [1:3990] "ALPHA" "ALPHA" "ALPHA" "ALPHA" ...
.. ..$ CH : chr [1:3990] "EEG" "EEG" "EEG" "EEG" ...
.. ..$ E : int [1:3990] 92 93 98 99 100 101 102 118 119 120 ...
.. ..$ PSD : num [1:3990] 29.5 37.5 33.5 22.7 17.8 ...
.. ..$ RELPSD: num [1:3990] 0.159 0.131 0.12 0.141 0.1 ...
$ RE :List of 1
..$ BL:'data.frame': 1 obs. of 4 variables:
.. ..$ DUR1: num 11970
.. ..$ DUR2: num 11970
.. ..$ NR1 : num 11970
.. ..$ NR2 : num 11970
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.