Closed josherrickson closed 6 months ago
To be clear, I'm not talking about situations where we pulled out some code from function A to use in completely different function B. I'm talking about situations where, for example, there's an existing function base::function
, and we copy the code to create propertee::.function
, with the idea that calls to both should be identical, except for a small tweak we made. If base::function
changes it's code, we could end up in a weird drifting state where we're producing results that are not consistent with base functionality in a way that would be hard to discover without these preemptive tests.
Good thinking. Option 3 makes most sense to me.
Message ID: @.***>
I like option 3 as well
I implemented this. I only did it for expand.model.frame
and confint.lm
; the robustbase functions seemed to be more modified/copied for specific purposes and less generic. @adamSales please let me know if you think I should include them in these checks.
This came up in #163 - we have a number of functions that are copies-with-small-tweaks. It'd be nice to be able to at least know if these functions change in base R so we can decide whether we keep consistent or do something else.
There may be more, but the functions I'm thinking of are:
confint.lm
in #163.expand.model.frame
I've got three potential solutions:
expand.model.frame
, then callexpect_identical(saved_results, capture.output(expand.model.frame))
. I think this is probably the best option.