to.data.frame: 'S3' generic; convert to data.frame *move* column to...

View source: R/to.data.frame.R

to.data.frameR Documentation

S3 generic; convert to data.frame move column to rownames

Description

Useful when working with data.tables; cannot have rownames. Other methods (as.data.frame, data.table::setDF) allow to convert to a data.frame but then another step is necessary to move an identifier column to rownames. This function allows the two in one step.

Usage

to.data.frame(x, ...)

## S3 method for class 'data.table'
to.data.frame(x, id.col = NULL, drop.id.col = TRUE)

Arguments

x

type: data.table A data.table object with an identifier column.

...

Value

data.table

Author(s)

Dereck de Mezquita


CoarfaBCM/derecksLabTools documentation built on April 3, 2022, 10:29 p.m.