Skip to content

Add print S3 methods for any classes missing them (e.g., EpiRange) #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
brookslogan opened this issue Sep 30, 2022 · 1 comment · Fixed by #232
Closed

Add print S3 methods for any classes missing them (e.g., EpiRange) #51

brookslogan opened this issue Sep 30, 2022 · 1 comment · Fixed by #232
Labels
enhancement New feature or request P2 low priority

Comments

@brookslogan
Copy link
Contributor

The highest-priority things to get print methods already have methods written, but may not be used; see #43. However, classes like EpiRange may still benefit from a neater-looking print method.

@brookslogan brookslogan added the P2 low priority label Sep 30, 2022
@dsweber2 dsweber2 added the enhancement New feature or request label May 17, 2023
@capnrefsmmat
Copy link
Contributor

Seconding that EpiRange in particular needs a print method. For daily and weekly data, they currently print like this:

epirange(as.Date("2021-01-01"), as.Date("2021-01-07"))
#> $from
#> [1] 20210101
#> 
#> $to
#> [1] 20210107
#> 
#> attr(,"class")
#> [1] "EpiRange"

epirange(202202, 202204)
#> $from
#> [1] 202202
#> 
#> $to
#> [1] 202204
#> 
#> attr(,"class")
#> [1] "EpiRange"

I think there should be a simple human-readable format, that (a) clearly states if it's daily or weekly, (b) puts the dates in a standard format like ISO 8601 instead of mashing components together with no spacing, and (c) is nice and compact on one line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P2 low priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants