Previous Page Contents

stats::zipCol -- convert a sequence of columns to a list of lists

Introduction

stats::zipCol(..) converts a sequence of columns to a format suitable for creating a stats::sample.

Call(s)

stats::zipCol(column1, column2, ..)

Parameters

column1, column2, .. - lists.

Returns

a list of lists.

Related Functions

stats::sample2list, stats::unzipCol

Details

Example 1

We convert a single column to a nested list:

>> stats::zipCol([a, b, c])
   
                              [[a], [b], [c]]
      

This list is accepted by stats::sample:

>> stats::sample(%)
   
                                    a
                                    b
                                    c
      

Example 2

We build a sample consisting of two columns:

>> column1 := [122, 442, 322]: column2 := [s, s, p]:
   stats::zipCol(column1, column2)
   
                      [[122, s], [442, s], [322, p]]
      
>> stats::sample(%)
   
                                 122  s
                                 442  s
                                 322  p
      

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000