You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, NAs and NaNs can count as duplicates if incomparables = TRUE. First, this is different from usage of incomparables in other functions such as match(), merge(), and duplicated(), and in particular, the behavior of is_duplicate(incomparables = FALSE) is opposite to that of, e.g., duplicated(incomparables = FALSE). Second, I'd like to incorporate three options for handling of NA and NaN:
never count them as duplicates (ie, return value will be FALSE for all NA and NaN elements)
allow them to count as duplicates (ie, return value may be TRUE if NA or NaN occurs more than nmax times
return NA for all NA elements (since in principle these could be a duplicate of an other value
the logic here is tricky though -- strictly speaking, shouldn't everything be NA if there's any NA in the vector, since in principle any of the values might match that NA?
would also need to think about how to treat NaN in this case, which doesn't have the same implications of NA.
At the very least, the argument name should be changed and made clearer, and I need to give more thought to the other options.
The text was updated successfully, but these errors were encountered:
Currently,
NA
s andNaN
s can count as duplicates ifincomparables = TRUE
. First, this is different from usage ofincomparables
in other functions such asmatch()
,merge()
, andduplicated()
, and in particular, the behavior ofis_duplicate(incomparables = FALSE)
is opposite to that of, e.g.,duplicated(incomparables = FALSE)
. Second, I'd like to incorporate three options for handling ofNA
andNaN
:FALSE
for allNA
andNaN
elements)TRUE
ifNA
orNaN
occurs more thannmax
timesNA
for allNA
elements (since in principle these could be a duplicate of an other valueNA
if there's anyNA
in the vector, since in principle any of the values might match thatNA
?NaN
in this case, which doesn't have the same implications ofNA
.At the very least, the argument name should be changed and made clearer, and I need to give more thought to the other options.
The text was updated successfully, but these errors were encountered: