lx | R Documentation |
ldb(), leval()
or leval.project()
Extract the levels/table(s) from an output list generated by ldb(), leval()
or leval.project()
lx(lst, cmd = "", f = "", ...)
lst |
a required named-list object, as generated by |
cmd |
(optional) names a command (i.e. a first-level item of |
f |
(optional) specify a specific strata to return (i.e. the second-level items of |
... |
all other following arguments. used together with |
depending on the arguments given, either a data-frame, a list of data-frames or only a message to the console
## Not run:
> sl <- lsl("s.lst")
> lattach(sl, 2)
> k <- leval("EPOCH & MASK ifnot=NREM2 & RE & PSD epoch spectrum sig=EEG")
> str(k, max.level=2)
List of 4
$ EPOCH:List of 1
..$ BL:'data.frame': 1 obs. of 4 variables:
$ MASK :List of 1
..$ EPOCH_MASK:'data.frame': 1 obs. of 8 variables:
$ PSD :List of 4
..$ CH :'data.frame': 1 obs. of 3 variables:
..$ B_CH :'data.frame': 10 obs. of 5 variables:
..$ CH_F :'data.frame': 41 obs. of 4 variables:
..$ B_CH_E:'data.frame': 3990 obs. of 6 variables:
$ RE :List of 1
..$ BL:'data.frame': 1 obs. of 5 variables:
> lx(k)
## just a message to the console
EPOCH : BL
MASK : EPOCH_MASK
PSD : CH B_CH CH_F B_CH_E
RE : BL
> lx(k,"EPOCH")
$BL
DUR INC NE
1 30 30 1195
> str(lx(k, "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 ...
> lx(k, "PSD", "B", "CH")
B CH PSD RELPSD
1 ALPHA EEG 15.654212 0.07091026
2 BETA EEG 5.123496 0.02320835
3 DELTA EEG 108.239902 0.49030380
4 FAST_SIGMA EEG 3.078775 0.01394620
5 GAMMA EEG 5.403482 0.02447663
6 SIGMA EEG 8.440213 0.03823237
7 SLOW EEG 38.865512 0.17605253
8 SLOW_SIGMA EEG 5.361438 0.02428618
9 THETA EEG 31.416015 0.14230789
10 TOTAL EEG 220.760887 1.00000000
## this is equivalent as
> lx(k, "PSD", "B_CH")
## and
> k$PSD$B_CH
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.