3 ms·
So, I'm not an R guy, but I pawed through some of the code. I get what you're saying, there's an environment, it needs to be just so, or it won't work. that's f
by jfoutz 5y ago
So, I'm not an R guy, but I pawed through some of the code. I get what you're saying, there's an environment, it needs to be just so, or it won't work. that's fine. And yeah, it does feel a lot like SQL.
I would point out this guy - https://github.com/TheEconomist/covid-19-the-economist-global-excess-deaths-model/blob/025cb1921500fa43da5ea56a877b1069833b7824/scripts/1_excess_deaths_global_estimates_script.R#L714 https://github.com/TheEconomist/covid-19-the-economist-globa...
that sort of has the look of something that took a pass or two to get right. And I think, would be nice to have a test case (sample call).
Again, not a hill I'm going to die on.
Overall, I don't think we have a big difference of opinion, yeah, it looks like gluing together libraries - as a non, native R speaker, I think I can make sense of the project, it's cool they put it out there, and I don't think there's anything _wrong_ with what they've got.
- nojito 5y agoThat function is pretty standard. If you want to run a loess, it runs the loess function if not it runs a windowed average. What exactly would you test it for?
- epistasis 5y agoThis is actually one case where I could see jfoutz's point! If I were developing this, I'd probably be running it in a notebook, and inspecting output on a few rows from the data frame. It would be easy enough to capture both the input and output and throw it into a stopifnot to record the testing that was performed interactively.