Package: withr 3.0.2

Lionel Henry

withr: Run Code 'With' Temporarily Modified Global State

A set of functions to run code 'with' safely and temporarily modified global state. Many of these functions were originally a part of the 'devtools' package, this provides a simple package with limited dependencies to provide access to these functions.

Authors:Jim Hester [aut], Lionel Henry [aut, cre], Kirill Müller [aut], Kevin Ushey [aut], Hadley Wickham [aut], Winston Chang [aut], Jennifer Bryan [ctb], Richard Cotton [ctb], Posit Software, PBC [cph, fnd]

withr_3.0.2.tar.gz
withr_3.0.2.tar.gz(r-4.5-noble)withr_3.0.2.tar.gz(r-4.4-noble)
withr_3.0.2.tgz(r-4.4-emscripten)withr_3.0.2.tgz(r-4.3-emscripten)
withr.pdf |withr.html
withr/json (API)
NEWS

# Install 'withr' in R:
install.packages('withr', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/r-lib/withr/issues

13.31 score 11k packages 1.2k scripts 1.3M downloads 2 mentions 79 exports 0 dependencies

Last updated 1 days agofrom:7563bb049e. Checks:OK: 2. Indexed: no.

TargetResultDate
Doc / VignettesOKOct 28 2024
R-4.5-linuxOKOct 28 2024

Exports:deferdefer_parentdeferred_cleardeferred_runglobal_deferlocal_local_bmplocal_cairo_pdflocal_cairo_pslocal_collatelocal_connectionlocal_db_connectionlocal_dirlocal_environmentlocal_envvarlocal_filelocal_jpeglocal_languagelocal_libpathslocal_localelocal_makevarslocal_message_sinklocal_namespacelocal_optionslocal_output_sinklocal_packagelocal_parlocal_pathlocal_pdflocal_pnglocal_postscriptlocal_preserve_seedlocal_rng_versionlocal_seedlocal_svglocal_temp_libpathslocal_tempdirlocal_tempfilelocal_tifflocal_timezonelocal_xfigmakevars_userset_makevarswith_with_bmpwith_cairo_pdfwith_cairo_pswith_collatewith_connectionwith_db_connectionwith_dirwith_environmentwith_envvarwith_filewith_jpegwith_languagewith_libpathswith_localewith_makevarswith_message_sinkwith_namespacewith_optionswith_output_sinkwith_packagewith_parwith_pathwith_pdfwith_pngwith_postscriptwith_preserve_seedwith_rng_versionwith_seedwith_svgwith_temp_libpathswith_tempdirwith_tempfilewith_tiffwith_timezonewith_xfig

Dependencies:

Changing and restoring state

Rendered fromwithr.Rmdusingknitr::rmarkdownon Oct 28 2024.

Last update: 2024-07-31
Started: 2017-12-19

Readme and manuals

Help Manual

Help pageTopics
Defer Evaluation of an Expressiondefer deferred_clear deferred_run defer_parent
Graphics devicesdevices local_bmp local_cairo_pdf local_cairo_ps local_jpeg local_pdf local_png local_postscript local_svg local_tiff local_xfig with_bmp with_cairo_pdf with_cairo_ps with_dev with_device with_jpeg with_pdf with_png with_postscript with_svg with_tiff with_xfig
Collation Orderlocal_collate with_collate
Connections which close themselveslocal_connection with_connection
DBMS Connections which disconnect themselves.local_db_connection with_db_connection
Working directorylocal_dir with_dir
Environment variableslocal_envvar with_envvar
Files which delete themselveslocal_file with_file
Torture Garbage Collectorwith_gctorture2
Languagelocal_language with_language
Library pathslocal_libpaths with_libpaths
Locale settingslocal_locale with_locale
Makevars variableslocal_makevars with_makevars
Optionslocal_options with_options
Execute code with a modified search pathlocal_environment local_namespace local_package with_environment with_namespace with_package
Graphics parameterslocal_par with_par
PATH environment variablelocal_path with_path
RNG versionlocal_rng_version with_rng_version
Random seedlocal_preserve_seed local_seed with_preserve_seed with_seed
Output redirectionlocal_message_sink local_output_sink with_message_sink with_output_sink with_sink
Library pathslocal_temp_libpaths with_temp_libpaths
Temporary files and directorieslocal_tempdir local_tempfile with_tempdir with_tempfile
Time zonelocal_timezone with_timezone
Execute code in temporarily altered environmentwithr-package withr