Skip to content

Commit

Permalink
Merge pull request #75 from r-lib/document-options
Browse files Browse the repository at this point in the history
Document options
  • Loading branch information
EmilHvitfeldt authored Sep 18, 2024
2 parents c67679d + 22b395b commit 939805e
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
26 changes: 26 additions & 0 deletions R/options.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#' sparsevctrs options
#'
#' These options can be set with `options()`.
#'
#' ## sparsevctrs.verbose_materialize
#'
#' This option is meant to be used as a diagnostic tool. Materialization of
#' sparse vectors are done silently by default. This can make it hard to
#' determine if your code is doing what you want.
#'
#' Setting `sparsevctrs.verbose_materialize` is a way to alert when
#' materialization occurs. Note that only the first materialization is counted
#' for the options below, as the materialized vector is cached.
#'
#' Setting `sparsevctrs.verbose_materialize = 1` or
#' `sparsevctrs.verbose_materialize = TRUE` will result in a message being
#' emitted each time a sparse vector is materialized.
#'
#' Setting `sparsevctrs.verbose_materialize = 2` will result in a warning being
#' thrown each time a sparse vector is materialized.
#'
#' Setting `sparsevctrs.verbose_materialize = 3` will result in an error being
#' thrown each time a sparse vector is materialized.
#'
#' @name sparsevctrs_options
NULL
1 change: 1 addition & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ reference:
- type-predicates
- extractors
- has_sparse_elements
- sparsevctrs_options
30 changes: 30 additions & 0 deletions man/sparsevctrs_options.Rd

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

0 comments on commit 939805e

Please sign in to comment.