split.ucr.base.tab: Splits a table into several sub-tables.

View source: R/ucr_base_tab_methods.r

split.ucr.base.tabR Documentation

Splits a table into several sub-tables.

Description

Splits a baseline table into a number of sub-tables, each containing a subset of the columns.

Usage

## S3 method for class 'ucr.base.tab'
split(object, group.partition, always.n = F)

Arguments

object

An object of class ucr.base.tab.

group.partition

A list specifying how to split the table. Each entry in the list is an array of group numbers.

always.n

If TRUE, then group size is included in all tables.

Value

A list of "smaller" ucr.base.tab objects.

Author(s)

Lars Lindhagen

See Also

ucr.base.tab

Examples

# Suppose that u is an object of class ucr.base.tab with 10 groups,
# and one wants to split it into three sub-tables as follows:
#    Sub-table 1: Groups 1, 2, 3.
#    Sub-table 2: Groups 4, 5, 6, 7.
#    Sub-table 3: Groups 8, 9, 10.
# The following call achieves this:
#  split(u, list(1:3, 4:7, 8:10))

renlund/ucR documentation built on March 25, 2023, 10:10 a.m.