Previous Page Next Page Contents

stats::concatRow -- concatenate samples row-wise

Introduction

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

Call(s)

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

Parameters

s1, s2, .. - samples of domain type stats::sample. Alternatively, lists may be entered, which are treated as rows of a sample.

Returns

a sample of domain type stats::sample.

Related Functions

stats::col, stats::concatCol, stats::row

Details

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:
   

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000