phac-nml-phrsd / wem

Wastewater Epidemic Model
MIT License
14 stars 2 forks source link

simplify simul_from_post() code with sumarise(across (...)) #14

Closed davidchampredon closed 2 years ago

davidchampredon commented 2 years ago

In simul.R simplify the huge summarize() code in simul_from_post() using the combination summarize (across(...)) . See https://stackoverflow.com/questions/64270888/dplyr-custom-function-in-summarize-at

The names of the new variables may even be automatically generated with a function (ie, one that appends .lo etc) using the argument .names of across().

davidchampredon commented 2 years ago

Done in b50f8a9b571d6acf0a39d88698ae0e0897c48935