SliceDfColumns: A function to slice data frames without loosing column names

Description Usage Arguments Value Examples

Description

A function to slice data frames without loosing column names

Usage

1
SliceDfColumns(df, columns)

Arguments

df

A dataframe to slice

columns

A integer vector. The ids of the columns to return.

Value

A dataframe containing only the columns number columns from df.

Examples

1
2
3
4
5
6
## Not run: 
SliceDfColumns(df, 1)
SliceDfColumns(df, 1:5)
SliceDfColumns(df, c(1,3,5))

## End(Not run)

laurentlab-mpipz/rsurvival documentation built on May 29, 2019, 9:14 a.m.