SliceDfRows: A function to slice data frames without loosing row names

Description Usage Arguments Value Examples

Description

A function to slice data frames without loosing row names

Usage

1
SliceDfRows(df, rows)

Arguments

df

A dataframe to slice

rows

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

Value

A dataframe containing only the rows number rows from df.

Examples

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

## End(Not run)

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