Public-Health-Scotland / phsmethods

An R package to standardise methods used in Public Health Scotland (https://public-health-scotland.github.io/phsmethods/)
https://public-health-scotland.github.io/phsmethods/
54 stars 14 forks source link

Add a `format` argument to `extract_fin_year()` #122

Closed Moohan closed 1 year ago

Moohan commented 1 year ago

This argument keeps the default format (so existing code will work without modification) and allows for choosing a numeric (integer) output.

I would find this useful, as I've been needing to do exactly this recently, not sure if we want to add it to this function though, so I've opened it as a draft.

If you think it's a worthwhile inclusion (and in this function), then I still need to:

codecov[bot] commented 1 year ago

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (106aaa6) 97.40% compared to head (b9d8bd2) 96.96%. Report is 3 commits behind head on dev.

Files Patch % Lines
R/extract_fin_year.R 84.61% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #122 +/- ## ========================================== - Coverage 97.40% 96.96% -0.44% ========================================== Files 13 13 Lines 424 429 +5 ========================================== + Hits 413 416 +3 - Misses 11 13 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Tina815 commented 1 year ago

We can leave this and still keep the current function as it is for now.