gesistsa / rio

🐟 A Swiss-Army Knife for Data I/O
http://gesistsa.github.io/rio/
599 stars 76 forks source link

`readr` and `vroom` as a replacement of `read.fwf2` #381

Closed chainsawriot closed 11 months ago

chainsawriot commented 11 months ago

Actually, haven depends on readr for 6 years now.

https://github.com/tidyverse/haven/blob/9b3b21b5e9b64867eb53818faa7e9a22480f347d/DESCRIPTION#L25

And readr depends on vroom. We don't need this code to parse fwf files as readr can do this much faster.


Actually, it also raises the question of whether we need datable::fread() and datatable::fwrite() anymore. But let's keep this discussion to fwf.

chainsawriot commented 11 months ago

Just reuse this old code

https://github.com/gesistsa/rio/blob/067a0ae805fdd96816fe9103af9f1843df3584a2/R/import_methods.R#L85-L126

chainsawriot commented 11 months ago

This whole bunch of code is barely tested.

https://github.com/gesistsa/rio/blob/840d27b5e00deef6ddd19ae138fb7404bc1b3ca3/R/export_methods.R#L42-L98