Closed ghost closed 8 years ago
Great catch. It seems that data.tables
don't take well to dplyr::gather
. I've included a line that will coerce any object that inherits data.table
to a data frame. That should take care of it for you.
The patch is in the latex-tables
branch. I'll move it up into the main branch when I get some more features put in. You should see this correction on CRAN around the middle of the month.
Great, thank you!
[Think that is tidyr::gather
(not dyplyr::gather
)? Otherwise we should let Hadley know, because dplyr
is supposed to work with data.tables
too.]
Yes, it should have been tidyr::gather
, and after looking at it some more, it might actually be the combination of dplyr::mutate
and data.table
. See https://github.com/hadley/dplyr/issues/1431 and https://github.com/Rdatatable/data.table/issues/1366. I'm at a loss for what the issue might be, but for now, I guess I'll have to coerce to a data frame. I'll keep an eye on it so that sometime in the future I might be able to avoid the coercion.
I often work with
data.frame
s anddata.table
s side by side as some commands written for adata.frame
get a hickup withdata.table
s. So doesdust()
. So maybe a tiny input check fordata.frame
s? Or for (accidentally) inputteddata.table
do just a quick conversion todata.frame
? [Note: this might be related to the considerations in #6.]