dark-peak-analytics / assertHE

R package to assist in the verification of health economic decision models.
https://dark-peak-analytics.github.io/assertHE/
Other
4 stars 10 forks source link

Proposed small adaptations to include testing #54

Closed RobertASmith closed 5 months ago

RobertASmith commented 7 months ago

After merging in your pull request I've branched off main and made some minor changes to include some tests.

May be worth a discussion on the local as I'm not sure of the benefit, is this critical?

Smit-tay commented 7 months ago

The "local" parameter is, I guess, unnecessary.

The hope was that this would solve the issue of polluting the global environment during testing, but, it seems that's not possible.

Either that, or I don't understand something quite fundamental.

W-Mohammed commented 6 months ago

The "local" parameter is, I guess, unnecessary.

The hope was that this would solve the issue of polluting the global environment during testing, but, it seems that's not possible.

Either that, or I don't understand something quite fundamental.

I have a suggestion to avoid polluting the global environment.

Source all files to a defined environment and restrict all subsequent manipulations to that environment. The package can then safely discard that environment once it is no longer needed. For example, the visualise function or shiny app can delete it post-rendering or upon exit.

What do you think @RobertASmith and @Smit-tay?