splitV: Split Data Vertically Into Subsets

View source: R/splitLONG.R

splitVR Documentation

Split Data Vertically Into Subsets

Description

Splits data into unequal and disjoint groups of columns (i.e. vertical splits)

Usage

splitV(data, splits)

Arguments

data

a "data.table" class data frame or convertible to "data.table" class

splits

integer, length 1, of value <= ncol(data). The number of disjoint selections (i.e. vertical splits). When splits = 0, there are no splits

Details

The smaller the splits value, the wider the column groups. Column order from source data is not preserved

Value

An exhaustive listenv of disjoint column groups from original data

Examples


if (interactive()) {

# 1. Split iris data vertically

data(iris)
a = splitV(iris, splits = 3)     # split data in 3 column groups
class(a)                         # listenv, environment
print(as.list(a))                # list

}

akin documentation built on May 19, 2026, 5:07 p.m.