Open TimTeaFan opened 3 years ago
Hi @TimTeaFan, thanks for submitting this issue - it's an interesting one. I would say that given {dplyr} fails in these instances, {poorman} should also fail. My initial curiosity lies in wondering where this fails within {dplyr}. Is it an issue from {dplyr} itself, {tibble} or maybe {tidyselect}? Once I know that, I will be better placed to understand where {poorman} should capture and handle this type of issue. I will do some digging and get back to you!
I was playing around with
data.frame
s with duplicate column names and stumbled upon this inconsistency with {dplyr}:Created on 2021-05-24 by the reprex package (v0.3.0)
The question is: is {poorman} supposed be 100% consistent with {dplyr}?
If yes then
poorman::select
should throw an error as well.On the other hand, {poorman} - unlike {dplyr} - might not be bound in the same way to the concept of tidy data, and it would be nice to have a go-to package when dealing with untidy
data.frame
's. In this case botha
columns should be selected.Regarding
mutate
the behavior differs as well:It seems like
mutate
automatically usescheck.names = TRUE
and renames the duplicate column name without notice. In this case an error might be preferable (or as an alternative, the column names could be left untouched).Created on 2021-05-24 by the reprex package (v0.3.0)
I didn't consider this to be a "bug", so I opened a blank issue.