-
Notifications
You must be signed in to change notification settings - Fork 1k
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
setclass() added to data.table.r #844
Conversation
If others agree it's useful, I'll go ahead and write up news/doc |
I love it, but I think append should be FALSE by default. |
@gsee, you are probably right. In my Rprofile, I have this function named as Would it make sense to use an alternate name with |
agreed. With the current implementation, if I call |
Ah, I think I see where the confusion is:
I do not think that is the case. so in the case of |
Separately, perhaps the warning in |
But...
and
|
I think I misunderstood. You're saying the user should guard against making the accident, not that setDT() and/or setclass() should try to fix it? |
no, @gsee, you had understood correctly. I had misunderstood. Specifically, I didn't realize that Personally, I think it should return @mattdowle and/or @arunsrinivasan , thoughts regarding output of |
@rsaporta right, But I'm not sure why we need |
@Arun, I use a function like setclass often. Usually, for inheriting from data.table. (Eg, I may use something like It's just a handy wrapper to save a few keystrokes. |
So |
I've run into an error produced (most probably) by altered class of data.table. ticker <- market.api.process("kraken",c("BTC","EUR"),"ticker") # Rbitcoin 0.9.3 function returns DT with additional class
pander::pandoc.table(ticker) and it results following R Markdown error:
and the class of ticker: class(ticker)
# [1] "btc.ticker" "data.table" "data.frame" Using the following solve the problem, so it must be related to additional class in DT: pander::pandoc.table(setDT(setDF(ticker))) also related to already closed #839 |
Closing this, as it's stale at this point. Have added an issue for |
Motivated by the question raised in #839, it might be useful to have a quick wrapper for