Closed krlmlr closed 6 years ago
https://github.com/johnmyleswhite/ProjectTemplate/blob/master/R/load.project.R#L255
This if is technically wrong, and will warn if the object has more than one class. For instance:
if
> class(data.table::data.table()) [1] "data.table" "data.frame"
Should everything that is a data frame be converted to a data table (any(...)), or should only "pure" data frames be converted to data tables (all(...))?
any(...)
all(...)
Implementing the second option as part of #76, still open for discussion.
The commit is bad, should be any instead of all (or an inherits() call).
any
all
inherits()
https://github.com/johnmyleswhite/ProjectTemplate/blob/master/R/load.project.R#L255
This
if
is technically wrong, and will warn if the object has more than one class. For instance:Should everything that is a data frame be converted to a data table (
any(...)
), or should only "pure" data frames be converted to data tables (all(...)
)?Implementing the second option as part of #76, still open for discussion.