aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2022-07-08 19:29:17 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2022-07-08 19:29:17 +0200
commit17bab8422795379a3cd40d6e5d0482e995a0d2f5 (patch)
tree53b3f6186b242818433b09f4f1c46ef0dfce83c8
parentf35e0b3d3b9f41bee2f5cc357afcb69e3aadad15 (diff)
Use inherits() instead of comparing class to string
-rw-r--r--R/mkinfit.R2
1 files changed, 1 insertions, 1 deletions
diff --git a/R/mkinfit.R b/R/mkinfit.R
index bf164c3f..1c2f8b5e 100644
--- a/R/mkinfit.R
+++ b/R/mkinfit.R
@@ -274,7 +274,7 @@ mkinfit <- function(mkinmod, observed,
# Check mkinmod and generate a model for the variable whith the highest value
# if a suitable string is given
parent_models_available = c("SFO", "FOMC", "DFOP", "HS", "SFORB", "IORE", "logistic")
- if (class(mkinmod) != "mkinmod") {
+ if (!inherits(mkinmod, "mkinmod")) {
presumed_parent_name = observed[which.max(observed$value), "name"]
if (mkinmod[[1]] %in% parent_models_available) {
speclist <- list(list(type = mkinmod, sink = TRUE))

Contact - Imprint