View source: R/ucr_base_tab_methods.r
split.ucr.base.tab | R Documentation |
Splits a baseline table into a number of sub-tables, each containing a subset of the columns.
## S3 method for class 'ucr.base.tab'
split(object, group.partition, always.n = F)
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 |
A list of "smaller" ucr.base.tab
objects.
Lars Lindhagen
ucr.base.tab
# 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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.