makeDataFrame {eatTools} | R Documentation |
Converts tbl
or data.table
objects to plain data.frames
for internal processing
Description
Function is mainly used for internal checks in the eatRep and eatModel package: objects
which expected to be data.frames
for further processing are converted to data.frame when their class
is tbl
, for example.
Usage
makeDataFrame (dat, name = "dat", minRow = 1, onlyWarn=TRUE)
Arguments
dat |
An object which is intended to be a data.frame. |
name |
Optional: name of data.frame for use in messages |
minRow |
When used internally, function report when data.frame has less rows than specified in |
onlyWarn |
If |
Value
data frame.
Examples
dat <- data.table::data.table(x1 = 1:5, y1 = letters[1:5])
# unexpected in 'classical' data frames
class(dat[,"x1"])
dat <- makeDataFrame(dat)
[Package eatTools version 0.7.6 Index]