Skip to content

Commit

Permalink
update examplesIf
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilHvitfeldt committed Nov 9, 2024
1 parent 02bb9b9 commit 827d61f
Show file tree
Hide file tree
Showing 40 changed files with 52 additions and 30 deletions.
2 changes: 1 addition & 1 deletion R/clean_levels.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#' [recipes::step_unknown()], [recipes::step_novel()], [recipes::step_other()]
#' @family Steps for Text Cleaning
#'
#' @examplesIf rlang::is_installed("janitor")
#' @examplesIf rlang::is_installed(c("modeldata", "janitor"))
#' library(recipes)
#' library(modeldata)
#' data(Smithsonian)
Expand Down
2 changes: 1 addition & 1 deletion R/dummy_hash.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
#' @seealso [recipes::step_dummy()]
#' @family Steps for Numeric Variables From Characters
#'
#' @examplesIf all(c("text2vec", "data.table") %in% rownames(installed.packages()))
#' @examplesIf all(c("modeldata", "text2vec", "data.table") %in% rownames(installed.packages()))
#' \dontshow{library(data.table)}
#' \dontshow{data.table::setDTthreads(2)}
#' \dontshow{Sys.setenv("OMP_NUM_THREADS" = 1)}
Expand Down
2 changes: 1 addition & 1 deletion R/lda.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#'
#' @family Steps for Numeric Variables From Tokens
#'
#' @examplesIf all(c("text2vec", "data.table") %in% rownames(installed.packages()))
#' @examplesIf all(c("modeldata", "text2vec", "data.table") %in% rownames(installed.packages()))
#' \dontshow{library(data.table)}
#' \dontshow{data.table::setDTthreads(2)}
#' \dontshow{Sys.setenv("OMP_THREAD_LIMIT" = 2)}
Expand Down
2 changes: 1 addition & 1 deletion R/ngram.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
#' @seealso [step_tokenize()] to turn characters into [`tokens`][tokenlist()]
#' @family Steps for Token Modification
#'
#' @examples
#' @examplesIf rlang::is_installed("modeldata")
#' library(recipes)
#' library(modeldata)
#' data(tate_text)
Expand Down
2 changes: 1 addition & 1 deletion R/sequence_onehot.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
#'
#' @family Steps for Numeric Variables From Characters
#'
#' @examples
#' @examplesIf rlang::is_installed("modeldata")
#' library(recipes)
#' library(modeldata)
#' data(tate_text)
Expand Down
2 changes: 1 addition & 1 deletion R/show_tokens.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' @return A list of character vectors
#' @export
#'
#' @examples
#' @examplesIf rlang::is_installed("modeldata")
#' text_tibble <- tibble(text = c("This is words", "They are nice!"))
#'
#' recipe(~text, data = text_tibble) %>%
Expand Down
2 changes: 1 addition & 1 deletion R/stem.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#' @seealso [step_tokenize()] to turn characters into [`tokens`][tokenlist()]
#' @family Steps for Token Modification
#'
#' @examples
#' @examplesIf rlang::is_installed("modeldata")
#' library(recipes)
#' library(modeldata)
#' data(tate_text)
Expand Down
2 changes: 1 addition & 1 deletion R/stopwords.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
#' @seealso [step_tokenize()] to turn characters into [`tokens`][tokenlist()]
#' @family Steps for Token Modification
#'
#' @examplesIf rlang::is_installed("stopwords")
#' @examplesIf rlang::is_installed(c("modeldata", "stopwords"))
#' library(recipes)
#' library(modeldata)
#' data(tate_text)
Expand Down
2 changes: 1 addition & 1 deletion R/textfeature.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#'
#' @family Steps for Numeric Variables From Characters
#'
#' @examples
#' @examplesIf rlang::is_installed("modeldata")
#' library(recipes)
#' library(modeldata)
#' data(tate_text)
Expand Down
2 changes: 1 addition & 1 deletion R/texthash.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
#' [step_text_normalization()] to perform text normalization.
#' @family Steps for Numeric Variables From Tokens
#'
#' @examplesIf all(c("text2vec", "data.table") %in% rownames(installed.packages()))
#' @examplesIf all(c("modeldata", "text2vec", "data.table") %in% rownames(installed.packages()))
#' \dontshow{library(data.table)}
#' \dontshow{data.table::setDTthreads(2)}
#' \dontshow{Sys.setenv("OMP_THREAD_LIMIT" = 2)}
Expand Down
2 changes: 1 addition & 1 deletion R/tf.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
#' @seealso [step_tokenize()] to turn characters into [`tokens`][tokenlist()]
#' @family Steps for Numeric Variables From Tokens
#'
#' @examples
#' @examplesIf rlang::is_installed("modeldata")
#' \donttest{
#' library(recipes)
#' library(modeldata)
Expand Down
2 changes: 1 addition & 1 deletion R/tfidf.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
#' @seealso [step_tokenize()] to turn characters into [`tokens`][tokenlist()]
#' @family Steps for Numeric Variables From Tokens
#'
#' @examples
#' @examplesIf rlang::is_installed("modeldata")
#' \donttest{
#' library(recipes)
#' library(modeldata)
Expand Down
2 changes: 1 addition & 1 deletion R/tokenfilter.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
#' @seealso [step_tokenize()] to turn characters into [`tokens`][tokenlist()]
#' @family Steps for Token Modification
#'
#' @examples
#' @examplesIf rlang::is_installed("modeldata")
#' library(recipes)
#' library(modeldata)
#' data(tate_text)
Expand Down
2 changes: 1 addition & 1 deletion R/tokenize.R
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
#' @seealso [step_untokenize()] to untokenize.
#' @family Steps for Tokenization
#'
#' @examples
#' @examplesIf rlang::is_installed("modeldata")
#' library(recipes)
#' library(modeldata)
#' data(tate_text)
Expand Down
2 changes: 1 addition & 1 deletion R/tokenize_bpe.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#' @seealso [step_untokenize()] to untokenize.
#' @family Steps for Tokenization
#'
#' @examplesIf rlang::is_installed("tokenizers.bpe")
#' @examplesIf rlang::is_installed(c("modeldata", "tokenizers.bpe"))
#' library(recipes)
#' library(modeldata)
#' data(tate_text)
Expand Down
2 changes: 1 addition & 1 deletion R/tokenize_sentencepiece.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#' @seealso [step_untokenize()] to untokenize.
#' @family Steps for Tokenization
#'
#' @examplesIf rlang::is_installed("sentencepiece")
#' @examplesIf rlang::is_installed(c("modeldata", "sentencepiece"))
#' library(recipes)
#' library(modeldata)
#' data(tate_text)
Expand Down
2 changes: 1 addition & 1 deletion R/tokenize_wordpiece.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#' @seealso [step_untokenize()] to untokenize.
#' @family Steps for Tokenization
#'
#' @examplesIf rlang::is_installed("wordpiece")
#' @examplesIf rlang::is_installed(c("modeldata", "wordpiece"))
#' library(recipes)
#' library(modeldata)
#' data(tate_text)
Expand Down
2 changes: 1 addition & 1 deletion R/tokenlist.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#'
#' @return a [tokenlist] object.
#'
#' @examples
#' @examplesIf rlang::is_installed("modeldata")
#' abc <- list(letters, LETTERS)
#' tokenlist(abc)
#'
Expand Down
2 changes: 1 addition & 1 deletion R/tokenmerge.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#' @seealso [step_tokenize()] to turn characters into [`tokens`][tokenlist()]
#' @family Steps for Token Modification
#'
#' @examples
#' @examplesIf rlang::is_installed("modeldata")
#' library(recipes)
#' library(modeldata)
#' data(tate_text)
Expand Down
2 changes: 1 addition & 1 deletion R/untokenize.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#' @seealso [step_tokenize()] to turn characters into [`tokens`][tokenlist()]
#' @family Steps for Un-Tokenization
#'
#' @examples
#' @examplesIf rlang::is_installed("modeldata")
#' library(recipes)
#' library(modeldata)
#' data(tate_text)
Expand Down
2 changes: 2 additions & 0 deletions man/show_tokens.Rd

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

2 changes: 1 addition & 1 deletion man/step_clean_levels.Rd

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

2 changes: 1 addition & 1 deletion man/step_dummy_hash.Rd

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

2 changes: 1 addition & 1 deletion man/step_lda.Rd

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

2 changes: 2 additions & 0 deletions man/step_ngram.Rd

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

2 changes: 2 additions & 0 deletions man/step_sequence_onehot.Rd

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

2 changes: 2 additions & 0 deletions man/step_stem.Rd

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

2 changes: 1 addition & 1 deletion man/step_stopwords.Rd

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

2 changes: 2 additions & 0 deletions man/step_textfeature.Rd

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

2 changes: 1 addition & 1 deletion man/step_texthash.Rd

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

3 changes: 2 additions & 1 deletion man/step_tf.Rd

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

3 changes: 2 additions & 1 deletion man/step_tfidf.Rd

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

2 changes: 2 additions & 0 deletions man/step_tokenfilter.Rd

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

2 changes: 2 additions & 0 deletions man/step_tokenize.Rd

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

2 changes: 1 addition & 1 deletion man/step_tokenize_bpe.Rd

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

2 changes: 1 addition & 1 deletion man/step_tokenize_sentencepiece.Rd

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

2 changes: 1 addition & 1 deletion man/step_tokenize_wordpiece.Rd

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

Loading

0 comments on commit 827d61f

Please sign in to comment.