-
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
Fully support raw vectors #5100
Comments
#5180 handled the last example. Note that order(as.raw(2:1))
# Error in order(as.raw(2:1)) : unimplemented type 'raw' in 'orderVector1' And this is intentional, per
So I'm not sure we should break parity with base here without a strong use case in mind. |
The problem with not supporting raw vectors is that (a) data.frames (and data.tables) allow raw columns and (b) if you forbid ordering of such columns, you're limited in what you can do with the data frame. I think I understand the rationale behind that note in Comparison, but I don't support its strict enforcement (and note that raw vector can be compared using Moreover, looking at the OP, even if we accept that raw vectors should not have an order, there's no reason why |
yes, but that's also true of list/expression columns. raw columns might be some intermediate state of an analysis, with the columns getting converted to allow further processing later, for example. again it would be useful to have some concrete use cases in mind as we did for complex support.
same again as list columns, but we only support grouping by orderable column types as of now (as opposed to unique-able column types). it would be a pretty substantial effort to refactor+abstract the code base to allow a mix of the two. |
I guess my counter to that point is that list/expression columns should in principle be supported too, but are difficult to implement. Raw vectors are by contrast easy to implement. I don't accept that raw vectors are not orderable -- that R is not really consistent on this point and I don't think we do much for our sanity in trying to adhere to it. For example Note we support |
Raw vectors can be an attractive type for certain low-cardinality variables because of its low memory footprint. However, using raw vectors in
data.table
are not fully supported. For example:Is there a reason raw vectors can't be used?
The text was updated successfully, but these errors were encountered: