Skip to content

Commit

Permalink
add prototype for year and quarter
Browse files Browse the repository at this point in the history
  • Loading branch information
Yunuuuu committed Nov 8, 2023
1 parent 3d16231 commit 04adde4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions R/class-FAERS.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,16 @@ methods::setClass(
format = "character"
),
prototype = list(
year = integer(),
quarter = character(),
data = NULL,
meddra = NULL,
deduplication = FALSE,
standardization = FALSE
)
)

## Validator for FAERS

################ utils methods ########################
################ validate method ########################
validate_faers <- function(object) {
if (length(object@year) != length(object@quarter)) {
return("the length of `@year` and `@quarter` must be the same")
Expand Down Expand Up @@ -135,6 +135,7 @@ methods::setClass(
contains = "FAERS"
)

################ show method ########################
#' @param object A [FAERS] object.
#' @importFrom methods show
#' @export
Expand Down

0 comments on commit 04adde4

Please sign in to comment.