Skip to content

Commit 8b99ce4

Browse files
dajmcdondshemetov
authored andcommitted
remove the subclass-ability
1 parent e32b9ca commit 8b99ce4

File tree

4 files changed

+6
-11
lines changed

4 files changed

+6
-11
lines changed

R/archive.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,6 @@ new_epi_archive <- function(
347347
rlang::warn(warning_message, class = "epiprocess__compactify_default_removed_rows")
348348
}
349349

350-
assert_character(subclass)
351350
structure(
352351
list(
353352
DT = compactified,
@@ -358,7 +357,7 @@ new_epi_archive <- function(
358357
clobberable_versions_start = clobberable_versions_start,
359358
versions_end = versions_end
360359
),
361-
class = c(subclass, "epi_archive")
360+
class = "epi_archive"
362361
)
363362
}
364363

R/epi_df.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,11 @@ NULL
167167
#' @param other_keys If your tibble has additional keys, be sure to specify them as a
168168
#' character vector here (typical examples are "age" or sub-geographies).
169169
#' @param ... Additional arguments passed to methods.
170-
#' @param subclass additional class, will be prepended to the `epi_df` class
171170
#' @return An `epi_df` object.
172171
#'
173172
#' @export
174173
new_epi_df <- function(x = tibble::tibble(), geo_type, time_type, as_of,
175-
other_keys = character(0L), ..., subclass = character(0L)) {
174+
other_keys = character(0L), ...) {
176175
# Define metadata fields
177176
metadata <- list()
178177
metadata$geo_type <- geo_type
@@ -191,7 +190,7 @@ new_epi_df <- function(x = tibble::tibble(), geo_type, time_type, as_of,
191190
}
192191

193192
# Apply epi_df class, attach metadata, and return
194-
class(x) <- c(subclass, "epi_df", class(x))
193+
class(x) <- c("epi_df", class(x))
195194
attributes(x)$metadata <- metadata
196195
return(x)
197196
}

man/epi_archive.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/epi_df.Rd

Lines changed: 1 addition & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)