Skip to content

Commit

Permalink
automatic pd interface
Browse files Browse the repository at this point in the history
adding the option to let orsf pick pd values for you. Also incorporating
classification and regression trees into the tests run for pd.
  • Loading branch information
bcjaeger committed Nov 25, 2023
1 parent 9f13ebd commit cc7c48a
Show file tree
Hide file tree
Showing 14 changed files with 997 additions and 917 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export(orsf_vi_anova)
export(orsf_vi_negate)
export(orsf_vi_permute)
export(orsf_vs)
export(pred_spec_auto)
import(R6)
import(data.table)
importFrom(Rcpp,sourceCpp)
Expand Down
8 changes: 6 additions & 2 deletions R/check.R
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,8 @@ check_arg_lteq <- function(arg_value, arg_name, bound, append_to_msg = NULL){
#' so hopefully nothing is returned.
#'
#' @noRd
check_arg_is_valid <- function(arg_value, arg_name, valid_options) {
check_arg_is_valid <- function(arg_value, arg_name, valid_options,
context = NULL) {

valid_arg <- arg_value %in% valid_options

Expand All @@ -278,8 +279,11 @@ check_arg_is_valid <- function(arg_value, arg_name, valid_options) {
sep = ', ',
last = ' or ')

# context needs an extra bit of text if it isn't null.
if(!is.null(context)) context <- paste0(" for ", context)

error_msg <- paste0(
arg_name, " should be <", expected_values, ">",
arg_name, " should be <", expected_values, ">", context,
" but is instead <", arg_values, ">"
)

Expand Down
Loading

0 comments on commit cc7c48a

Please sign in to comment.