Skip to content

Commit

Permalink
use dontrun instead of data.table setter function
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilHvitfeldt committed Aug 16, 2023
1 parent a476546 commit 3369a7c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 23 deletions.
1 change: 0 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ Imports:
glue
Suggests:
covr,
data.table,
dials (>= 1.2.0),
hardhat,
janitor,
Expand Down
13 changes: 2 additions & 11 deletions R/dummy_hash.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,31 +66,22 @@
#' @seealso [recipes::step_dummy()]
#' @family Steps for Numeric Variables From Characters
#'
#' @examplesIf rlang::is_installed("text2vec") && rlang::is_installed("data.table")
#' @examplesIf rlang::is_installed("text2vec")
#' library(recipes)
#' library(modeldata)
#' data(grants)
#'
#' \dontshow{
#' # restrict threads for CRAN compliance
#' dt_threads <- data.table::getDTthreads()
#' data.table::setDTthreads(1)
#' }
#'
#' grants_rec <- recipe(~sponsor_code, data = grants_other) %>%
#' step_dummy_hash(sponsor_code)
#'
#' \dontrun{
#' grants_obj <- grants_rec %>%
#' prep()
#'
#' bake(grants_obj, grants_test)
#'
#' tidy(grants_rec, number = 1)
#' tidy(grants_obj, number = 1)
#'
#' \dontshow{
#' # restore thread setting
#' data.table::setDTthreads(dt_threads)
#' }
#' @export
step_dummy_hash <-
Expand Down
13 changes: 2 additions & 11 deletions man/step_dummy_hash.Rd

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

0 comments on commit 3369a7c

Please sign in to comment.