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
I tried to use row_patch to fill in missing values in a data frame. It failed by design, because it didn't meet the requirement for the function: "key values in y must occur in x". However, I was able to successfully execute the row patch by using the match function from base R (see below).
This isn't a typical bug report because it is clearly stated that this is a limitation of the function, but I wanted to point out that it can be done using a different function from base R. Since row_patch is currently an experimental function in dplyr, I wanted to provide feedback to hopefully improve it. row_patch is much cleaner and I would prefer to use it if possible.
It would also be nice if row_patch could preserve other variables in y that don't occur in x. match can handle this as well.
Probably would be fixed by #5588 if this comment is still applicable in that PR #5588 (comment)
I think is makes sense that keys in y that do not exist in x should always be silently ignored when updating/deleting/patching (no changes needed - we do this in this PR).
And @mgirlich followed up that it might be useful to make that an optional check, rather than just silently ignoring them #5588 (comment)
I tried to use
row_patch
to fill in missing values in a data frame. It failed by design, because it didn't meet the requirement for the function: "key values in y must occur in x". However, I was able to successfully execute the row patch by using thematch
function from base R (see below).This isn't a typical bug report because it is clearly stated that this is a limitation of the function, but I wanted to point out that it can be done using a different function from base R. Since
row_patch
is currently an experimental function indplyr
, I wanted to provide feedback to hopefully improve it.row_patch
is much cleaner and I would prefer to use it if possible.It would also be nice if
row_patch
could preserve other variables in y that don't occur in x.match
can handle this as well.The text was updated successfully, but these errors were encountered: