tableLayout: Calculates multiple page/column table layout.

Description Usage Arguments Details Value See Also Examples

View source: R/tabelas.R

Description

Given a table with a certain number of lines, this function calculates the number of columns and pages necessary to print the table in paper.

Usage

1
tableLayout(nlines, ntabcols, ntablines, byrow = FALSE, fillbyrow = TRUE)

Arguments

nlines

Number of lines of the original table.

ntabcols

Number of coumns the page should be subdivided.

ntablines

Number of lines each page should have.

byrow

Should the tables be filled by rows?

fillbyrow

How to handle partial last pages. Should the last page be "condensed" to minimize the number of rows?

Details

Data frames are very useful and there are several ways to generate an output. Often, however, the tables should be printed and the printout spans several pages and what is worse, if the table has few columns, there will be lots of white space. This function calculates a layout that can be used to pack the table in several pages. The printed table might use several pages and several columns on each page. On each page, the columns bight be filled by rows or by columns and the last page, usually partially filled only, how should it be filled?

Value

3D array where the indicies specify the line, column and page where each line will go.

See Also

latexOutput

Examples

1
2
3
4
print(tableLayout(30, 2, 9))
print(tableLayout(30, 2, 9), byrow=TRUE)
print(tableLayout(30, 2, 9, filledbyrow=TRUE))
print(tableLayout(30, 3, 10))

tunelipt/wutils documentation built on Nov. 5, 2019, 11:01 a.m.