Closed Fuco1 closed 3 years ago
hmm, it would be a breaking change. For robustness, I'll select()
both key and value columns for either case.
What I had in mind with
It would be nice to have an argument to always select key columns [...]
was something like select(data, .with_keys = T)
. It can default to false so the current behaviour is preserved. I suppose it's not a difficult change since there must be some logic dropping the column already. Should I have a stab at implementing this?
The issue with this new argument is that it will be ignored when selecting multiple keys. It will only takes effect on a single key.
If a tsibble has two series (key combination results in two series) and I select a data column, the key column is also selected.
However, if I first filter and only one series is present in the result, the key column is dropped.
It would be nice to have an argument to always select key columns such that generic code can be written against the filtered (or non-filtered) subset.
Filtered case: