first.columns: Returns the first n columns of a dataframe and adds ...

Description Usage Arguments Value Author(s)

Description

When we export a table, we sometimes want to truncate its columns so it can be entirely displayed and be readable. This function keeps the first ncol columns (such as can be done using df[1:ncol]), and adds as a last column "..." symbols to show the table was truncated. Notably used for exportation to LaTeX tables.

Usage

1

Arguments

df

a dataframe

ncol

the count of columns to keep

Value

the same dataframe with ncol columns and additional "..."

Author(s)

Samuel Thiriot <samuel.thiriot@res-ear.ch>


samthiriot/gosp.dpp documentation built on May 18, 2019, 3:44 p.m.