smallAreaHealthStatisticsUnit / rapidInquiryFacility

The Rapid Inquiry Facility (RIF) helps epidemiologists and public health researchers in environmental health activities.
GNU Lesser General Public License v3.0
14 stars 5 forks source link

The R scripts for smoothing are partially duplicated #99

Closed devilgate closed 5 years ago

devilgate commented 5 years ago

The smoothing scripts Adj_Cov_Smooth_JRI.R and Adj_Cov_Smooth_csv.R contain a lot of duplicated code. That seems necessary, because the latter is used for the feature that allows rerunning a study from the command line, so it has to run in a standalone fashion. The former is used by the general runtime.

However, duplication like that means that the versions will be out of step with each other. If not now, then at some point in the future.

And as we introduce the Risk Analysis script, we will be in danger of repeating this situation.

So I propose creating a suitable way to remove the duplication, making a single script usable in both environments. And then using the same approach as we integrate the Risk Analysis script.