Documentation

stats::concatRow

Concatenate samples row-wise

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

Syntax

stats::concatRow(s1, s2, <s3, …>)

Description

stats::concatRow(s1, s2, …) creates a new sample consisting of the rows of the samples s1, s2 etc.

All samples must have the same number of columns.

Examples

Example 1

We 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 2

The 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:

Parameters

s1, s2, …

Samples of domain type stats::sample. Alternatively, lists may be entered, which are treated as rows of a sample.

Return Values

Sample of domain type stats::sample.

See Also

MuPAD Functions

Was this topic helpful?