-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
first and last return all elements when n = 0 #350
Comments
Thanks for the report. I consider this a bug. Do you have thoughts about how to fix? |
I guess n=0 could return NA or NULL |
My prior is to return the same as x[0,]. I could be convinced otherwise...
|
I think that's a good solution. So no error, but no data other than column names. |
agree with I haven't looked at the code yet, but will do so this weekend, see if i can come up with a PR or at least suggestions also, I'd like to loop in @jangorecki and the data.table folks as they have special handling for overiding these functions Rdatatable/data.table#4053 |
i've taken a stab at the unit test and changes to could you take a look and give any feedback before i start on |
When @ethanbsmith your patch looked good to me, so I made the necessary changes to |
Description
i'm not sure if this is a bug or intended behavior. its not what I expected
if this is not a bug, could you help me understand why not so we can possibly enhance the docs
thx
Expected behavior
when n = 0 i expect an empty set top be returned
Minimal, reproducible example
Session Info
The text was updated successfully, but these errors were encountered: