Skip to content

Commit

Permalink
use inherits for class check
Browse files Browse the repository at this point in the history
  • Loading branch information
ejikeugba committed Nov 24, 2024
1 parent 0b9fa0c commit 6476369
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/serp.fit.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ serpfit <- function(x, y, wt, yMtx, link, slope, reverse, control,
slope <- 'partial'
if (slope == 'partial'){
if (!is.null(globalEff)) {
if(class(globalEff) != "formula")
if (!inherits(globalEff, "formula"))
stop("no object of class formula used in globalEff", call. = FALSE)
if (grepl('["]', c(globalEff)))
stop("variable name in quotes not allowed in globalEff",
Expand Down

0 comments on commit 6476369

Please sign in to comment.