stats::sample2list --
convert a sample to a list of lists
Introductionstats::sample2list(s) converts the sample s to a list of
lists.
Call(s)stats::sample2list(s)
Parameterss |
- | a sample of domain type stats::sample. |
Returnsa list of lists.
Related
Functionsstats::unzipCol,
stats::zipCol
Detailsstats::sample2list(s) are the rows of the
sample s.
Example
1First we create a sample from a list of lists:
>> stats::sample([[123, s, 1/2], [442, s, -1/2], [322, p, -1/2]])
123 s 1/2
442 s -1/2
322 p -1/2
The input list may be recovered by
stats::sample2list:
>> stats::sample2list(%)
[[123, s, 1/2], [442, s, -1/2], [322, p, -1/2]]