diff --git a/NEWS.md b/NEWS.md index eaeaf69..f49016f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -10,8 +10,9 @@ will return an extra class of `gee_linear_reg` ## Minor Fixes and Improvements 1. Fix #142 - Add `gee`, `glmnet`, and `rules` to the `core_packages()` function. -2. Fix #148 - Update `create_model_spec()` -3. Fix #156 - Update `internal_set_args_to_tune()` to use `dplyr::pick()` instead +2. Fix #148 - Update `create_model_spec()` +3. Fix #155 - Add class `tidyaml_base_tbl` to the output of `create_model_spec()` +4. Fix #156 - Update `internal_set_args_to_tune()` to use `dplyr::pick()` instead of `dplyr::cur_data()` since it was deprecated. # tidyAML 0.0.2 diff --git a/R/make-model-spec.R b/R/make-model-spec.R index 60be6d0..9dc93bc 100644 --- a/R/make-model-spec.R +++ b/R/make-model-spec.R @@ -23,18 +23,16 @@ #' create_model_spec( #' .parsnip_eng = list("lm","glm","glmnet","cubist"), #' .parsnip_fns = list( -#' rep( -#' "linear_reg", 3), -#' "cubist_rules" +#' "linear_reg","linear_reg","linear_reg", +#' "cubist_rules" #' ) #' ) #' #' create_model_spec( #' .parsnip_eng = list("lm","glm","glmnet","cubist"), #' .parsnip_fns = list( -#' rep( -#' "linear_reg", 3), -#' "cubist_rules" +#' "linear_reg","linear_reg","linear_reg", +#' "cubist_rules" #' ), #' .return_tibble = FALSE #' ) @@ -105,7 +103,7 @@ create_model_spec <- function(.parsnip_eng = list("lm"), .model_spec = models ) - class(ret_tbl) <- c("create_mod_spec_tbl", class(ret_tbl)) + class(ret_tbl) <- c(class(ret_tbl), "create_mod_spec_tbl", "tidyaml_base_tbl") ifelse(ret_tibble, return(ret_tbl), return(models_list)) } diff --git a/man/create_model_spec.Rd b/man/create_model_spec.Rd index cb653df..b4388be 100644 --- a/man/create_model_spec.Rd +++ b/man/create_model_spec.Rd @@ -39,18 +39,16 @@ choose that is supported by the \code{parsnip} ecosystem. create_model_spec( .parsnip_eng = list("lm","glm","glmnet","cubist"), .parsnip_fns = list( - rep( - "linear_reg", 3), - "cubist_rules" + "linear_reg","linear_reg","linear_reg", + "cubist_rules" ) ) create_model_spec( .parsnip_eng = list("lm","glm","glmnet","cubist"), .parsnip_fns = list( - rep( - "linear_reg", 3), - "cubist_rules" + "linear_reg","linear_reg","linear_reg", + "cubist_rules" ), .return_tibble = FALSE )