Skip to content

Commit

Permalink
data.frame type check
Browse files Browse the repository at this point in the history
  • Loading branch information
brandmaier committed Jul 4, 2024
1 parent 6af4ae7 commit 02d6cc4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions R/semtree.R
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@
#' @export
semtree <- function(model, data = NULL, control = NULL, constraints = NULL,
predictors = NULL, ...) {

# some checks on the data
if (!is.null(data)) {
if (!is.data.frame(data)) {
stop("Error with 'data' argument: semtree currently only supports data frames.")
}
}

# TODO: change this throughout
dataset <- data

Expand Down

0 comments on commit 02d6cc4

Please sign in to comment.