Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document options #75

Merged
merged 2 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading