Open karoliskoncevicius opened 4 years ago
@moodymudskipper pinging for opinions.
It's consistent with replace, and to me seems like the right behavior but we could override the error message with a better one.
On a second thought - maybe this also should be left for possible future adjustments. We are close to having a first workable version, so no need to complicate things further until then...
The translation of the first error is something like this :
The ouput of
x %out[]% interval
contains undetermined elements (shown asNA
values), so in turn the number of the elements to replace is unknown. However you triedx %out[]% interval <- value
with avalue
of length superior to 1 that cannot be assigned or recycled unambiguously.
Your english is better than mine so maybe you'll have a better wording
It wouldn't be that bad to make this warning fail though... As much as I like consistency with base, I think this is never useful, you can have a script running for 20 min, only to spit when it will crash a collection of these warnings, with an intimidating "type warnings() to see the first 50". Maybe better cut it at the source.
I was working with examples in the help files and stumbled upon this by accident:
This is of course a non-intended usage. But it's a bit unintuitive to receive this message. More so because if
x
didn't have missing values - it would work: