danicat / read.dbc

An R package for reading data in the DBC (compressed DBF) format used by DATASUS.
69 stars 29 forks source link

Minor code cleanups #1

Closed leofontenelle closed 8 years ago

leofontenelle commented 8 years ago

While the code seems to be running fine, I would like to provide a few suggestions of minor code improvements in read.dbc:

Also, in both read.dbc and dbc2dbf I used a stopifnot(), which might or might not suit your preferences.

danicat commented 8 years ago

Thanks for your suggestions Leo. Here are my comments:

I don't want to discourage you to contribute, but please be careful with the code you submit. Also, beware of over tuning / over pruning. This code is simple enough to be readable and usable. Sometimes we try to complicate simple things and take the chance to introduce bugs like those above.

leofontenelle commented 8 years ago

Thanks for the comments! I saw the opportunity for on.exit() and got carried away. Sorry for not testing the code before sending the suggestions, I haven't figured out how to do it yet. (Sorry for not sleeping on the suggestions either!)