ropensci / arkdb

Archive and unarchive databases as flat text files
https://docs.ropensci.org/arkdb
Other
78 stars 6 forks source link

Pass `na` argument to readers #30

Closed noamross closed 4 years ago

noamross commented 4 years ago

In addition to delim, and quote, readers should allow the user to specify na (typically, "", "NA", or both).

I was writing a bulk import method for Postgres when I realized I needed this.

Interestingly, several SQL CSV import variants allow the user to specify an escape character, as well. Base and readr readers just turn \ on and off.

cboettig commented 4 years ago

Agreed! PR?

I looked into just supporting “...” ( https://github.com/ropensci/arkdb/pull/23) for write side but recall I ran into some trouble. Still might be worth revisiting on both the read and write side.

Maybe worth noting that thanks to @richfitz, read & write methods are pluggable, so you could write separate wrappers for specific read behavior, though clearly that is a cludgy exercise...

cboettig commented 4 years ago

all readers support ... now (and have for a while, not sure when)