Skip to content

Commit

Permalink
allow empty numeric data
Browse files Browse the repository at this point in the history
  • Loading branch information
bcjaeger committed Apr 29, 2024
1 parent 635c41c commit 273684e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions R/orsf_R6.R
Original file line number Diff line number Diff line change
Expand Up @@ -2503,6 +2503,15 @@ ObliqueForest <- R6::R6Class(

numeric_data <- select_cols(self$data, private$data_names$x_numeric)

if(is_empty(numeric_data)){

private$data_bounds <- matrix(NA, nrow=5, ncol=1,
dimnames = list(c('10%', '25%', '50%', '75%', '90%'),
"placeholder"))
return()

}

if(self$na_action == 'omit'){
numeric_data <- collapse::fsubset(numeric_data, private$data_rows_complete)
}
Expand Down

0 comments on commit 273684e

Please sign in to comment.