Skip to content

Commit

Permalink
use !(inherits(object, class)) instead of class(x) == FALSE
Browse files Browse the repository at this point in the history
  • Loading branch information
krauwe committed Feb 19, 2024
1 parent 7d7b2b3 commit a6d88cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/convert_nuts_level.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ convert_nuts_level <-
# CODE BREAKING CHECKS
#------------------------
# Input checks
!(any(class(output) == "nuts.classified"))
if (!(inherits(data, "nuts.classified")))
cli_abort(
"Input {.arg data} must be a nuts.classified-object, not {.obj_type_friendly {data}}."
)
Expand Down
2 changes: 1 addition & 1 deletion R/convert_nuts_version.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ convert_nuts_version <-
# CODE BREAKING CHECKS
#------------------------
# Input checks
!(any(class(output) == "nuts.classified"))
if (!(inherits(data, "nuts.classified")))
cli_abort(
"Input {.arg data} must be a nuts.classified-object, not {.obj_type_friendly {data}}."
)
Expand Down

0 comments on commit a6d88cd

Please sign in to comment.