## `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

- `stats::zipCol` is useful for converting column data given in lists to a list of lists accepted by `stats::sample`.
- `stats::zipCol` is the inverse of `stats::unzipCol`.

#### 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

- new function

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000