Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upexport with append #201
Comments
leeper
added
the
bug
label
Feb 19, 2019
This comment has been minimized.
This comment has been minimized.
Good call. Want to send a PR (including a test)? Should be a pretty simple fix around here: https://github.com/leeper/rio/blob/master/R/export_methods.R#L5 |
This comment has been minimized.
This comment has been minimized.
Sure, will do. |
This comment has been minimized.
This comment has been minimized.
I just took care of this. Thanks for raising the issue! |
leeper
added this to the v0.6 milestone
Feb 26, 2019
leeper
closed this
in
015f242
Feb 26, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
julian-urbano commentedFeb 15, 2019
When
export
ing a data.frame in CSV, one useful option is to append the contents to an existing file (eg. when processing in batches). Indata.table::fwrite
there is an argumentappend
that does precisely this, of course omitting the column names when appending.If we try this using
rio::export
, it doesn't work becausecol.names
is always set toTRUE
inexport_delim
.To solve this we need to manually set
col.names = FALSE
, but it should use the default infwrite
that writes the column names if the file does not exist, or omits if it does.What do you think?
Thanks!