Skip to content

Commit 01f2262

Browse files
committed
wip+doc: add S3 implementation of epi_archive
* remove comment #417 * bump version to 0.7.6 and add NEWS line
1 parent 4e65e51 commit 01f2262

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+5452
-41
lines changed

DESCRIPTION

+3
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,19 @@ Depends:
7373
URL: https://cmu-delphi.github.io/epiprocess/
7474
Collate:
7575
'archive.R'
76+
'archive_new.R'
7677
'autoplot.R'
7778
'correlation.R'
7879
'data.R'
7980
'epi_df.R'
8081
'epiprocess.R'
8182
'group_by_epi_df_methods.R'
8283
'methods-epi_archive.R'
84+
'grouped_archive_new.R'
8385
'grouped_epi_archive.R'
8486
'growth_rate.R'
8587
'key_colnames.R'
88+
'methods-epi_archive_new.R'
8689
'methods-epi_df.R'
8790
'outliers.R'
8891
'reexports.R'

NAMESPACE

+27
Original file line numberDiff line numberDiff line change
@@ -6,40 +6,58 @@ S3method(as_epi_df,data.frame)
66
S3method(as_epi_df,epi_df)
77
S3method(as_epi_df,tbl_df)
88
S3method(as_epi_df,tbl_ts)
9+
S3method(as_of,epi_archive2)
910
S3method(as_tibble,epi_df)
1011
S3method(as_tsibble,epi_df)
1112
S3method(autoplot,epi_df)
13+
S3method(clone,epi_archive2)
14+
S3method(clone,grouped_epi_archive2)
1215
S3method(dplyr_col_modify,col_modify_recorder_df)
1316
S3method(dplyr_col_modify,epi_df)
1417
S3method(dplyr_reconstruct,epi_df)
1518
S3method(dplyr_row_slice,epi_df)
1619
S3method(epix_truncate_versions_after,epi_archive)
20+
S3method(epix_truncate_versions_after,epi_archive2)
1721
S3method(epix_truncate_versions_after,grouped_epi_archive)
22+
S3method(epix_truncate_versions_after,grouped_epi_archive2)
1823
S3method(group_by,epi_archive)
24+
S3method(group_by,epi_archive2)
1925
S3method(group_by,epi_df)
2026
S3method(group_by,grouped_epi_archive)
27+
S3method(group_by,grouped_epi_archive2)
2128
S3method(group_by_drop_default,grouped_epi_archive)
29+
S3method(group_by_drop_default,grouped_epi_archive2)
2230
S3method(group_modify,epi_df)
2331
S3method(groups,grouped_epi_archive)
32+
S3method(groups,grouped_epi_archive2)
2433
S3method(key_colnames,data.frame)
2534
S3method(key_colnames,default)
2635
S3method(key_colnames,epi_archive)
2736
S3method(key_colnames,epi_df)
2837
S3method(next_after,Date)
2938
S3method(next_after,integer)
39+
S3method(print,epi_archive2)
3040
S3method(print,epi_df)
41+
S3method(print,grouped_epi_archive2)
3142
S3method(select,epi_df)
43+
S3method(slide,grouped_epi_archive2)
3244
S3method(summary,epi_df)
45+
S3method(truncate_versions_after,grouped_epi_archive2)
3346
S3method(ungroup,epi_df)
3447
S3method(ungroup,grouped_epi_archive)
48+
S3method(ungroup,grouped_epi_archive2)
3549
S3method(unnest,epi_df)
3650
export("%>%")
3751
export(archive_cases_dv_subset)
52+
export(archive_cases_dv_subset_2)
3853
export(arrange)
3954
export(as_epi_archive)
55+
export(as_epi_archive2)
4056
export(as_epi_df)
57+
export(as_of)
4158
export(as_tsibble)
4259
export(autoplot)
60+
export(clone)
4361
export(detect_outlr)
4462
export(detect_outlr_rm)
4563
export(detect_outlr_stl)
@@ -50,24 +68,33 @@ export(epi_slide_mean)
5068
export(epi_slide_opt)
5169
export(epi_slide_sum)
5270
export(epix_as_of)
71+
export(epix_as_of2)
5372
export(epix_merge)
73+
export(epix_merge2)
5474
export(epix_slide)
75+
export(epix_slide2)
5576
export(epix_truncate_versions_after)
77+
export(fill_through_version)
5678
export(filter)
5779
export(group_by)
5880
export(group_modify)
5981
export(growth_rate)
6082
export(is_epi_archive)
83+
export(is_epi_archive2)
6184
export(is_epi_df)
6285
export(is_grouped_epi_archive)
86+
export(is_grouped_epi_archive2)
6387
export(key_colnames)
6488
export(max_version_with_row_in)
6589
export(mutate)
90+
export(new_epi_archive2)
6691
export(new_epi_df)
6792
export(next_after)
6893
export(relocate)
6994
export(rename)
7095
export(slice)
96+
export(slide)
97+
export(truncate_versions_after)
7198
export(ungroup)
7299
export(unnest)
73100
importFrom(R6,R6Class)

NEWS.md

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Pre-1.0.0 numbering scheme: 0.x will indicate releases, while 0.x.y will indicat
3232
## Breaking changes
3333

3434
- Switched `epi_df`'s `other_keys` default from `NULL` to `character(0)`; PR #390
35+
- 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)
3536

3637
# epiprocess 0.7.0
3738

R/archive.R

-3
Original file line numberDiff line numberDiff line change
@@ -514,9 +514,6 @@ epi_archive <-
514514
fromLast = TRUE
515515
) %>%
516516
tibble::as_tibble() %>%
517-
# (`as_tibble` should de-alias the DT and its columns in any edge
518-
# cases where they are aliased. We don't say we guarantee this
519-
# though.)
520517
dplyr::select(-"version") %>%
521518
as_epi_df(
522519
geo_type = self$geo_type,

0 commit comments

Comments
 (0)