Closed daniel-simeone closed 1 year ago
You can use vctrs::"%0%"
for this. It supports empty data frames as well.
@lionel- This is actually a very useful feature for packages that import rlang
. Moreover, I always expect rlang::`%||%`
to behave that way, so IMHO they kind of belong together.
Could you consider re-exporting it?
For most packages importing rlang
, importing vctrs
is quite an overkill.
The problem is that rlang and vctrs are designed to be imported together, and the latter uses vec_is_empty()
in its %0%
implementation which rlang can't use.
I couldn't help but notice the lovely little %|0|% operator (currently not exported) in operators.R (right after %||%)