Learn R Programming

genpathmox (version 0.6)

df_to_blocks: Split a data frame into blocks

Description

Split a data frame into blocks

Usage

df_to_blocks(DataFrame, blocks, byrow = TRUE)

Arguments

DataFrame

a data frame to split

blocks

either a list or a vector indicating the blocks. If blocks is a list of vectors, then the length of each vector defines the size of the blocks. If blocks is a vector, then each element represents the size of the blocks.

byrow

logical. If TRUE (the default) the data frame is split by rows, otherwise the data frame is split by columns

Value

A list of data frames

Details

Internal function.