Learn R Programming

reporttools (version 1.1.3)

colToMat: Break a n * p data frame in a data frame with ceiling(n / cols) rows and cols * p columns

Description

Often, one does not want to span a data frame over several pages. This function breaks a \(n \times p\) data frame in a data frame with ceiling(n / cols) rows and cols * p columns.

Usage

colToMat(tab, cols)

Arguments

tab

The data frame to be reformatted.

cols

Number of columns of the reformatted data.frame.

Value

Returns the reformatted data frame.