Skip to content

feat+wip: refactor epi_archive to use S3 #430

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
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: epiprocess
Title: Tools for basic signal processing in epidemiology
Version: 0.7.5
Version: 0.7.6
Authors@R: c(
person("Jacob", "Bien", role = "ctb"),
person("Logan", "Brooks", email = "[email protected]", role = c("aut", "cre")),
Expand Down Expand Up @@ -73,16 +73,19 @@ Depends:
URL: https://cmu-delphi.github.io/epiprocess/
Collate:
'archive.R'
'archive_new.R'
'autoplot.R'
'correlation.R'
'data.R'
'epi_df.R'
'epiprocess.R'
'group_by_epi_df_methods.R'
'methods-epi_archive.R'
'grouped_archive_new.R'
'grouped_epi_archive.R'
'growth_rate.R'
'key_colnames.R'
'methods-epi_archive_new.R'
'methods-epi_df.R'
'outliers.R'
'reexports.R'
Expand Down
27 changes: 27 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -6,65 +6,92 @@ S3method(as_epi_df,data.frame)
S3method(as_epi_df,epi_df)
S3method(as_epi_df,tbl_df)
S3method(as_epi_df,tbl_ts)
S3method(as_of,epi_archive2)
S3method(as_tibble,epi_df)
S3method(as_tsibble,epi_df)
S3method(autoplot,epi_df)
S3method(clone,epi_archive2)
S3method(clone,grouped_epi_archive2)
S3method(dplyr_col_modify,col_modify_recorder_df)
S3method(dplyr_col_modify,epi_df)
S3method(dplyr_reconstruct,epi_df)
S3method(dplyr_row_slice,epi_df)
S3method(epix_truncate_versions_after,epi_archive)
S3method(epix_truncate_versions_after,epi_archive2)
S3method(epix_truncate_versions_after,grouped_epi_archive)
S3method(epix_truncate_versions_after,grouped_epi_archive2)
S3method(group_by,epi_archive)
S3method(group_by,epi_archive2)
S3method(group_by,epi_df)
S3method(group_by,grouped_epi_archive)
S3method(group_by,grouped_epi_archive2)
S3method(group_by_drop_default,grouped_epi_archive)
S3method(group_by_drop_default,grouped_epi_archive2)
S3method(group_modify,epi_df)
S3method(groups,grouped_epi_archive)
S3method(groups,grouped_epi_archive2)
S3method(key_colnames,data.frame)
S3method(key_colnames,default)
S3method(key_colnames,epi_archive)
S3method(key_colnames,epi_df)
S3method(next_after,Date)
S3method(next_after,integer)
S3method(print,epi_archive2)
S3method(print,epi_df)
S3method(print,grouped_epi_archive2)
S3method(select,epi_df)
S3method(slide,grouped_epi_archive2)
S3method(summary,epi_df)
S3method(truncate_versions_after,grouped_epi_archive2)
S3method(ungroup,epi_df)
S3method(ungroup,grouped_epi_archive)
S3method(ungroup,grouped_epi_archive2)
S3method(unnest,epi_df)
export("%>%")
export(archive_cases_dv_subset)
export(archive_cases_dv_subset_2)
export(arrange)
export(as_epi_archive)
export(as_epi_archive2)
export(as_epi_df)
export(as_of)
export(as_tsibble)
export(autoplot)
export(clone)
export(detect_outlr)
export(detect_outlr_rm)
export(detect_outlr_stl)
export(epi_archive)
export(epi_cor)
export(epi_slide)
export(epix_as_of)
export(epix_as_of2)
export(epix_merge)
export(epix_merge2)
export(epix_slide)
export(epix_slide2)
export(epix_truncate_versions_after)
export(fill_through_version)
export(filter)
export(group_by)
export(group_modify)
export(growth_rate)
export(is_epi_archive)
export(is_epi_archive2)
export(is_epi_df)
export(is_grouped_epi_archive)
export(is_grouped_epi_archive2)
export(key_colnames)
export(max_version_with_row_in)
export(mutate)
export(new_epi_archive2)
export(new_epi_df)
export(next_after)
export(relocate)
export(rename)
export(slice)
export(slide)
export(truncate_versions_after)
export(ungroup)
export(unnest)
importFrom(R6,R6Class)
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Pre-1.0.0 numbering scheme: 0.x will indicate releases, while 0.x.y will indicat
## Breaking changes

- Switched `epi_df`'s `other_keys` default from `NULL` to `character(0)`; PR #390
- Refactor `epi_archive` to use S3 instead of R6 for its object model. The calls to some functions will change, but the functionality will remain the same. It will also help us maintain the package better in the future. (#340)

# epiprocess 0.7.0

Expand Down
3 changes: 0 additions & 3 deletions R/archive.R
Original file line number Diff line number Diff line change
Expand Up @@ -514,9 +514,6 @@ epi_archive <-
fromLast = TRUE
) %>%
tibble::as_tibble() %>%
# (`as_tibble` should de-alias the DT and its columns in any edge
# cases where they are aliased. We don't say we guarantee this
# though.)
dplyr::select(-"version") %>%
as_epi_df(
geo_type = self$geo_type,
Expand Down
Loading