Skip to content

Commit

Permalink
Uses xpectr conditionally in example
Browse files Browse the repository at this point in the history
  • Loading branch information
Ludvig committed Nov 19, 2022
1 parent a290372 commit aaf0899
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
16 changes: 9 additions & 7 deletions R/update_hyperparameters.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,16 @@
#'
#' # 'cost' is required
#' # throws error
#' xpectr::capture_side_effects(
#' update_hyperparameters(
#' kernel = "linear",
#' "scale" = FALSE,
#' hyperparameters = hparams,
#' .required = "cost"
#' if (requireNamespace("xpectr", quietly = TRUE)){
#' xpectr::capture_side_effects(
#' update_hyperparameters(
#' kernel = "linear",
#' "scale" = FALSE,
#' hyperparameters = hparams,
#' .required = "cost"
#' )
#' )
#' )
#' }
#'
#' }
update_hyperparameters <- function(..., hyperparameters, .required = NULL){
Expand Down
16 changes: 9 additions & 7 deletions man/update_hyperparameters.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit aaf0899

Please sign in to comment.