-
Notifications
You must be signed in to change notification settings - Fork 991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can not use head or kable function on data.table objrcts(data.table 1.9.3) #809
Comments
I've just upgraded and get this issue also
locale: attached base packages: other attached packages: loaded via a namespace (and not attached): |
Reproduced with knitr v1.6 but v1.7 released to CRAN on 13 Oct seems to fix the issue yihui/knitr@e34c279. That comment appears to have been motivated by dplyr objects though - I don't understand the issue there. |
As you obviously know the dplyr is designed to operate on data.table too, I believe they might have in mind dplyr which operate on data.table but just didn't mention |
It doesn't seem to have been to do with data.table. Here's the issue : yihui/knitr#851 So it seems that that fix happened by chance to fix the issue caused by me whitelisting knitr as well. Turns out there was no need to whitelist knitr because it was already working fine (since it evals user code with envir=globalenv()).
Because we should rely on that as.data.frame() in knitr. It is now in v1.7 and that's a copy and not ideal. The commit just now in data.table just made means that v1.6 now works again. If knitr adds more functions that use data.frame syntax on a data.table (or reverts to the previous version of kable()), then it can now and it will work. If other packages eval'ing user code also want to use data.frame syntax in their own functions as well, then they can now. So this is now more robust. Before, the cedta.override was too blunt in that it made all the code in such packages data.table-aware as well as all we really wanted which was the eval() of user code. New NEWS item is :
|
Since data.table 1.9.2 version run incorrectly in slidify, I install the developed version 1.9.3, but another problem arises when i use
kable
function from knitr.Here is my code:
The Error message:
Currently I use
kable(as.data.frame(DT))
which works but not elegant.The text was updated successfully, but these errors were encountered: