dplyr 1.0.9
-
New
rows_append()
which works likerows_insert()
but ignores keys and
allows you to insert arbitrary rows with a guarantee that the type ofx
won't change (#6249, thanks to @krlmlr for the implementation and @mgirlich
for the idea). -
The
rows_*()
functions no longer require that the key values inx
uniquely
identify each row. Additionally,rows_insert()
androws_delete()
no
longer require that the key values iny
uniquely identify each row. Relaxing
this restriction should make these functions more practically useful for
data frames, and alternative backends can enforce this in other ways as needed
(i.e. through primary keys) (#5553). -
rows_insert()
gained a newconflict
argument allowing you greater control
over rows iny
with keys that conflict with keys inx
. A conflict arises
if a key iny
already exists inx
. By default, a conflict results in an
error, but you can now also"ignore"
thesey
rows. This is very similar to
theON CONFLICT DO NOTHING
command from SQL (#5588, with helpful additions
from @mgirlich and @krlmlr). -
rows_update()
,rows_patch()
, androws_delete()
gained a newunmatched
argument allowing you greater control over rows iny
with keys that are
unmatched by the keys inx
. By default, an unmatched key results in an
error, but you can now also"ignore"
thesey
rows (#5984, #5699). -
rows_delete()
no longer requires that the columns ofy
be a strict subset
ofx
. Only the columns specified throughby
will be utilized fromy
,
all others will be dropped with a message. -
The
rows_*()
functions now always retain the column types ofx
. This
behavior was documented, but previously wasn't being applied correctly
(#6240). -
The
rows_*()
functions now fail elegantly ify
is a zero column data frame
andby
isn't specified (#6179).