steno-aarhus / osdc

Open-Source Diabetes Classifier: an R package to classify diabetes status in Danish registers
https://steno-aarhus.github.io/osdc/
Other
1 stars 1 forks source link

Convert import code into package-ready functions #3

Closed lwjohnst86 closed 11 months ago

lwjohnst86 commented 1 year ago

Like the previous PRs, I've written what and why I'm making changes to code in the commits. Review them if you are interested in the whys of things.

Also, for this package, I'd suggest considering not including code that imports/saves data and keep the package sharply on calculating diabetes status based on input data. One reason being is that, for instance in this PR, you use RDS to store the data, but with data like registers, a format like Apache Parquet is better for faster processing and importing. So the package only has inputs of already loaded data and outputs of only data as tibble/datatable/data.frame, that will also really simplify how much work you put into converting these code into a functioning package and (eventually) submitting to CRAN or something.

lwjohnst86 commented 11 months ago

I don't think this function should be in this package, but I'm merging this in for now so that we can eventually move these functions out.