@@ -71,10 +71,10 @@ validate_faers <- function(object) {
7171 if (length(object @ year ) != length(object @ quarter )) {
7272 return (" the length of `@year` and `@quarter` must be the same" )
7373 }
74- if (! all(object @ quarter %chin % faers_file_quarters )) {
74+ if (! all(object @ quarter %chin % FAERS_FILE_QUARTERS )) {
7575 return (sprintf(
7676 " `@quarter` must be values in %s" ,
77- oxford_comma(faers_file_quarters , final = " or" )
77+ oxford_comma(FAERS_FILE_QUARTERS , final = " or" )
7878 ))
7979 }
8080 if (anyDuplicated(faers_period(object ))) {
@@ -87,10 +87,10 @@ validate_faers <- function(object) {
8787 if (length(object @ deduplication ) != 1L || is.na(object @ deduplication )) {
8888 return (" @deduplication must be a bool, `TRUE` or `FALSE`" )
8989 }
90- if (! rlang :: is_string(object @ format , faers_file_format )) {
90+ if (! rlang :: is_string(object @ format , FAERS_FILE_FORMAT )) {
9191 return (sprintf(
9292 " `@format` must be a string of %s" ,
93- oxford_comma(faers_file_format , final = " or" )
93+ oxford_comma(FAERS_FILE_FORMAT , final = " or" )
9494 ))
9595 }
9696 TRUE
@@ -114,9 +114,9 @@ methods::setClass(
114114
115115methods :: setValidity(" FAERSascii" , function (object ) {
116116 data <- object @ data
117- if (! all(faers_ascii_file_fields %chin % names(data ))) {
117+ if (! all(FAERS_ASCII_FILE_FIELDS %chin % names(data ))) {
118118 return (sprintf(
119- " `@data` must contain the all ascii fields, including %s" , oxford_comma(faers_ascii_file_fields )
119+ " `@data` must contain the all ascii fields, including %s" , oxford_comma(FAERS_ASCII_FILE_FIELDS )
120120 ))
121121 }
122122 if (! all(vapply(data , data.table :: is.data.table , logical (1L )))) {
0 commit comments