stats::concatRow --
concatenate samples row-wise
Introductionstats::concatRow(s1, s2, ..) creates a new
sample consisting of the rows of the samples s1,
s2 etc.
Call(s)stats::concatRow(s1, s2 <, s3, ..>)
Parameterss1, s2, .. |
- | samples of domain type stats::sample. Alternatively, lists
may be entered, which are treated as rows of a sample. |
Returnsa sample of domain type stats::sample.
Related
Functionsstats::col, stats::concatCol, stats::row
Details
Example
1We create a small sample:
>> stats::sample([[123, g], [442, f]])
123 g
442 f
A list is concatenated to the sample as a row:
>> stats::concatRow(%, [x, y])
123 g
442 f
x y
Example
2The following samples contain columns for ``gender'' and ``age'':
>> s1 := stats::sample([["f", 36], ["m", 25]]); s2 := stats::sample([["m", 26], ["f", 22]])
"f" 36
"m" 25
"m" 26
"f" 22
We build a larger sample:
>> stats::concatRow(s1, s2)
"f" 36
"m" 25
"m" 26
"f" 22
>> delete s1, s2: