-
Notifications
You must be signed in to change notification settings - Fork 18
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
combineCols()
errors when called via do.call()
with a named list of objects to be combined
#62
Comments
This is because |
Does the generic need to have |
Note that even in base R they couldn't make their mind: The thing is that there are some complications when defining a generic with dispatch on
This is generally too strict. For example, a reasonable expectation is that if some of the supplied objects don't have the class of the first object, they'll be coerced and things will just work. Like in:
For
Yes it works, but that's because additional generic All that complexity/overhead is avoided by simply dispatching on the first argument like Not a perfect solution because, as you've noticed, named arguments can get in the way:
Even though this is a BIG gotcha with If we wanted to fix this, we'd need to introduce the Unfortunately there's no way we can fix this for |
Thanks for the details, @hpages. |
Indeed, this was a major issue with the first versions of the |
Please note that this may properly be a bug report for S4Vectors or SumarizedExperiment, so I'm tagging @hpages, but I encountered it when applying
combineCols()
viado.call()
to a list of SingleCellExperiment objects and perhaps something needs to be fixed here too?I'm unsure exactly when this error is being triggered but I note that this error exists/persists lower down in the
combineCols()
methods stack, e.g., when applied to a DataFrame:Created on 2022-01-12 by the reprex package (v2.0.1)
Session info
The text was updated successfully, but these errors were encountered: