-
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
data.table does not behave like a data.frame #5529
Comments
Thanks for long report. I suggest to invest more time into reading documentation. FAQ and introduction. Feature you requested was already requested before so your request is a duplicate. In one issue I quite deeply elaborated why insertion/deletion rows is not as simple as columns. |
Actually using i=3.5 to insert a row between 3rd and 4th something new that haven't been requested before, and is quite interesting idea. |
I meant this explanation #4345 (comment) |
Thank you for your response here are my thoughts: Thank you for sharing your comments, I humbly accept all your suggestions. Even though I am quite an avid user of I am happy you found the idea for Now that you mention it, I understand why adding rows by-reference is not as simple as adding columns. Perhaps then, I am also happy that appending a row is in the roadmap and hope to take this opportunity to piggyback row insertion in there too. Also, I think the under-the-hood solution for calling As for the difference in behavior between |
as of now only rbindlist/rbind |
I will close this issue as duplicate of #660 |
I assume this means that |
Not 100%, this syntax you presented here is currently not supported. |
My understanding was that all
data.table
s are meant to be fully compatible withdata.frames
. However, I might be mistaken. If they are meant to be fully compatible I found something thatdata.frames
can do that I believedata.tables
cannot (and this is a bug).I'm talking about appending a row of data at the end of the
data.thing
. A reproducible example is bellow.If
data.table
s are not meant to be fully compatible withdata.frames
then it would be nice to have an easy way to append a row (and hopefully even insert) of data (this is also a feature request). I know currently one can userbind()
orrbindlist()
. However, I am referring to something using thei
andj
arguments something likedt[3.5, `:=`(c(col1, col2, ...)) ]
would insert a new row between rows 3 and 4 with the new data being presented in order in the vectorc(col1, col2, ...)
or in a named listlist("col1" = val1, "col2" = val2, ...)
. It would also be cool if instead of using the:=
operator one usted the.
wrapper to make it so that line insertions are not permanent.I couldn't find any reference to a
data.table
way* of inserting/appending a new row nor to any other cases where adata.frame
behaves differently.data.table
way I'm referring to a fast, efficient way of preforming an operation inside[]
.Thanks to everyone developing the
data.table
! this is my Nu.1 package for R ! <3Minimal reproducible example
Created on 2022-11-16 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: