{
  "_id": "6a1ece34b401979e7340df1c",
  "Package": "withr",
  "Title": "Run Code 'With' Temporarily Modified Global State",
  "Version": "3.0.2.9001",
  "Authors@R": "c(\nperson(\"Jim\", \"Hester\", role = \"aut\"),\nperson(\"Lionel\", \"Henry\", , \"lionel@posit.co\", role = c(\"aut\", \"cre\")),\nperson(\"Kirill\", \"Müller\", , \"krlmlr+r@mailbox.org\", role = \"aut\"),\nperson(\"Kevin\", \"Ushey\", , \"kevinushey@gmail.com\", role = \"aut\"),\nperson(\"Hadley\", \"Wickham\", , \"hadley@posit.co\", role = \"aut\"),\nperson(\"Winston\", \"Chang\", role = \"aut\"),\nperson(\"Jennifer\", \"Bryan\", role = \"ctb\"),\nperson(\"Richard\", \"Cotton\", role = \"ctb\"),\nperson(\"Posit Software, PBC\", role = c(\"cph\", \"fnd\"))\n)",
  "Description": "A set of functions to run code 'with' safely and\ntemporarily modified global state. Many of these functions were\noriginally a part of the 'devtools' package, this provides a\nsimple package with limited dependencies to provide access to\nthese functions.",
  "License": "MIT + file LICENSE",
  "URL": "https://withr.r-lib.org, https://github.com/r-lib/withr#readme",
  "BugReports": "https://github.com/r-lib/withr/issues",
  "VignetteBuilder": "knitr",
  "Config/Needs/website": "tidyverse/tidytemplate",
  "Config/testthat/edition": "3",
  "Encoding": "UTF-8",
  "Roxygen": "list(markdown = TRUE)",
  "RoxygenNote": "7.3.2",
  "Collate": "'aaa.R' 'collate.R' 'connection.R' 'db.R' 'defer-exit.R'\n'standalone-defer.R' 'defer.R' 'devices.R' 'local_.R' 'with_.R'\n'dir.R' 'env.R' 'file.R' 'language.R' 'libpaths.R' 'locale.R'\n'makevars.R' 'namespace.R' 'options.R' 'par.R' 'path.R' 'rng.R'\n'seed.R' 'wrap.R' 'sink.R' 'tempfile.R' 'timezone.R'\n'torture.R' 'utils.R' 'with.R'",
  "Repository": "https://r-lib.r-universe.dev",
  "Date/Publication": "2026-05-19 12:11:04 UTC",
  "RemoteUrl": "https://github.com/r-lib/withr",
  "RemoteRef": "HEAD",
  "RemoteSha": "91e1ac602ae693696f5aa58a41a261b3123f8233",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-05-19 14:01:40 UTC",
    "User": "root"
  },
  "Author": "Jim Hester [aut],\nLionel Henry [aut, cre],\nKirill Müller [aut],\nKevin Ushey [aut],\nHadley Wickham [aut],\nWinston Chang [aut],\nJennifer Bryan [ctb],\nRichard Cotton [ctb],\nPosit Software, PBC [cph, fnd]",
  "Maintainer": "Lionel Henry <lionel@posit.co>",
  "MD5sum": "fb50f08113532a012c0a316751de4892",
  "_user": "r-lib",
  "_type": "src",
  "_file": "withr_3.0.2.9001.tar.gz",
  "_fileid": "2b1123d4be2b742193bdf868c522d1b7f05340c002a4d0dc514c2a57fdbbdb9a",
  "_filesize": 281124,
  "_sha256": "2b1123d4be2b742193bdf868c522d1b7f05340c002a4d0dc514c2a57fdbbdb9a",
  "_created": "2026-05-19T14:01:40.000Z",
  "_published": "2026-06-02T12:36:04.710Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 79072006220,
      "time": 127,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7085702738"
    },
    {
      "job": 79072006223,
      "time": 120,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7085699685"
    },
    {
      "job": 79072006504,
      "time": 84,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7085686806"
    },
    {
      "job": 79072006739,
      "time": 112,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7085695929"
    },
    {
      "job": 79072005681,
      "time": 170,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7085645499"
    },
    {
      "job": 79072006250,
      "time": 83,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7149686852"
    },
    {
      "job": 79072006234,
      "time": 94,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7085688062"
    },
    {
      "job": 79072007387,
      "time": 86,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7085684584"
    },
    {
      "job": 79072006350,
      "time": 85,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7085684307"
    }
  ],
  "_buildurl": "https://github.com/r-universe/r-lib/actions/runs/26102087891",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/r-lib/withr",
  "_commit": {
    "id": "91e1ac602ae693696f5aa58a41a261b3123f8233",
    "author": "Lionel Henry <lionel.hry@proton.me>",
    "committer": "Lionel Henry <lionel.hry@proton.me>",
    "message": "Mention fix in NEWS\n",
    "time": 1779192664
  },
  "_maintainer": {
    "name": "Lionel Henry",
    "email": "lionel@posit.co",
    "login": "lionel-",
    "description": "",
    "uuid": 4465050
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 3.6.0",
      "role": "Depends"
    },
    {
      "package": "graphics",
      "role": "Imports"
    },
    {
      "package": "grDevices",
      "role": "Imports"
    },
    {
      "package": "callr",
      "role": "Suggests"
    },
    {
      "package": "DBI",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "methods",
      "role": "Suggests"
    },
    {
      "package": "rlang",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "version": ">= 2.12",
      "role": "Suggests"
    },
    {
      "package": "RSQLite",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    }
  ],
  "_owner": "r-lib",
  "_selfowned": true,
  "_usedby": 13638,
  "_updates": [
    {
      "week": "2025-43",
      "n": 1
    },
    {
      "week": "2026-02",
      "n": 1
    },
    {
      "week": "2026-21",
      "n": 2
    }
  ],
  "_tags": [],
  "_stars": 178,
  "_contributors": [
    {
      "user": "jimhester",
      "count": 256,
      "uuid": 205275
    },
    {
      "user": "lionel-",
      "count": 149,
      "uuid": 4465050
    },
    {
      "user": "hadley",
      "count": 40,
      "uuid": 4196
    },
    {
      "user": "krlmlr",
      "count": 19,
      "uuid": 1741643
    },
    {
      "user": "jennybc",
      "count": 11,
      "uuid": 599454
    },
    {
      "user": "gaborcsardi",
      "count": 5,
      "uuid": 660288
    },
    {
      "user": "michaelchirico",
      "count": 5,
      "uuid": 7606389
    },
    {
      "user": "ellessenne",
      "count": 2,
      "uuid": 10330005
    },
    {
      "user": "alexcipro",
      "count": 2,
      "uuid": 9034129
    },
    {
      "user": "wendtke",
      "count": 1,
      "uuid": 42548298
    },
    {
      "user": "kyleam",
      "count": 1,
      "uuid": 1297788
    },
    {
      "user": "lauracion",
      "count": 1,
      "uuid": 17729900
    },
    {
      "user": "mlopez-ibanez",
      "count": 1,
      "uuid": 2620021
    },
    {
      "user": "batpigandme",
      "count": 1,
      "uuid": 831732
    },
    {
      "user": "malfaro2",
      "count": 1,
      "uuid": 29290521
    },
    {
      "user": "mpaulacaldas",
      "count": 1,
      "uuid": 33395215
    },
    {
      "user": "mtmorgan",
      "count": 1,
      "uuid": 118552
    },
    {
      "user": "multimeric",
      "count": 1,
      "uuid": 5019367
    },
    {
      "user": "romainfrancois",
      "count": 1,
      "uuid": 2625526
    },
    {
      "user": "zkamvar",
      "count": 1,
      "uuid": 3639446
    },
    {
      "user": "orichters",
      "count": 1,
      "uuid": 90761609
    },
    {
      "user": "jonkeane",
      "count": 1,
      "uuid": 700357
    },
    {
      "user": "jeroenjanssens",
      "count": 1,
      "uuid": 1368256
    },
    {
      "user": "javierluraschi",
      "count": 1,
      "uuid": 3478847
    },
    {
      "user": "czeildi",
      "count": 1,
      "uuid": 9638790
    },
    {
      "user": "meta00",
      "count": 1,
      "uuid": 8456490
    },
    {
      "user": "dragosmg",
      "count": 1,
      "uuid": 13176361
    },
    {
      "user": "dskard",
      "count": 1,
      "uuid": 8673892
    },
    {
      "user": "davisvaughan",
      "count": 1,
      "uuid": 19150088
    },
    {
      "user": "bjarkehautop",
      "count": 1,
      "uuid": 102542670
    },
    {
      "user": "ashesitr",
      "count": 1,
      "uuid": 2363178
    },
    {
      "user": "angelinepro",
      "count": 1,
      "uuid": 10690305
    }
  ],
  "_userbio": {
    "uuid": 22618716,
    "type": "organization",
    "name": "R infrastructure"
  },
  "_downloads": {
    "count": 1563976,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/withr"
  },
  "_mentions": 2,
  "_devurl": "https://github.com/r-lib/withr",
  "_pkgdown": "https://withr.r-lib.org",
  "_searchresults": 1492,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "extra/withr.html",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/r-lib/withr",
  "_realowner": "r-lib",
  "_cranurl": true,
  "_releases": [
    {
      "version": "1.0.0",
      "date": "2015-09-22"
    },
    {
      "version": "1.0.1",
      "date": "2016-02-04"
    },
    {
      "version": "1.0.2",
      "date": "2016-06-20"
    },
    {
      "version": "2.0.0",
      "date": "2017-07-28"
    },
    {
      "version": "2.1.0",
      "date": "2017-11-01"
    },
    {
      "version": "2.1.1",
      "date": "2017-12-19"
    },
    {
      "version": "2.1.2",
      "date": "2018-03-15"
    },
    {
      "version": "2.2.0",
      "date": "2020-04-20"
    },
    {
      "version": "2.3.0",
      "date": "2020-09-22"
    },
    {
      "version": "2.4.0",
      "date": "2021-01-16"
    },
    {
      "version": "2.4.1",
      "date": "2021-01-26"
    },
    {
      "version": "2.4.2",
      "date": "2021-04-18"
    },
    {
      "version": "2.4.3",
      "date": "2021-11-30"
    },
    {
      "version": "2.5.0",
      "date": "2022-03-03"
    },
    {
      "version": "2.5.1",
      "date": "2023-09-26"
    },
    {
      "version": "2.5.2",
      "date": "2023-10-30"
    },
    {
      "version": "3.0.0",
      "date": "2024-01-16"
    },
    {
      "version": "3.0.1",
      "date": "2024-07-31"
    },
    {
      "version": "3.0.2",
      "date": "2024-10-28"
    }
  ],
  "_exports": [
    "defer",
    "defer_parent",
    "deferred_clear",
    "deferred_run",
    "global_defer",
    "local_",
    "local_bmp",
    "local_cairo_pdf",
    "local_cairo_ps",
    "local_collate",
    "local_connection",
    "local_db_connection",
    "local_dir",
    "local_environment",
    "local_envvar",
    "local_file",
    "local_jpeg",
    "local_language",
    "local_libpaths",
    "local_locale",
    "local_makevars",
    "local_message_sink",
    "local_namespace",
    "local_options",
    "local_output_sink",
    "local_package",
    "local_par",
    "local_path",
    "local_pdf",
    "local_png",
    "local_postscript",
    "local_preserve_seed",
    "local_rng_version",
    "local_seed",
    "local_svg",
    "local_temp_libpaths",
    "local_tempdir",
    "local_tempfile",
    "local_tiff",
    "local_timezone",
    "local_xfig",
    "makevars_user",
    "set_makevars",
    "with_",
    "with_bmp",
    "with_cairo_pdf",
    "with_cairo_ps",
    "with_collate",
    "with_connection",
    "with_db_connection",
    "with_dir",
    "with_environment",
    "with_envvar",
    "with_file",
    "with_jpeg",
    "with_language",
    "with_libpaths",
    "with_locale",
    "with_makevars",
    "with_message_sink",
    "with_namespace",
    "with_options",
    "with_output_sink",
    "with_package",
    "with_par",
    "with_path",
    "with_pdf",
    "with_png",
    "with_postscript",
    "with_preserve_seed",
    "with_rng_version",
    "with_seed",
    "with_svg",
    "with_temp_libpaths",
    "with_tempdir",
    "with_tempfile",
    "with_tiff",
    "with_timezone",
    "with_xfig"
  ],
  "_help": [
    {
      "page": "defer",
      "title": "Defer Evaluation of an Expression",
      "concept": [
        "local-related functions"
      ],
      "topics": [
        "defer",
        "deferred_clear",
        "deferred_run",
        "defer_parent"
      ]
    },
    {
      "page": "devices",
      "title": "Graphics devices",
      "topics": [
        "devices",
        "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"
      ]
    },
    {
      "page": "with_collate",
      "title": "Collation Order",
      "topics": [
        "local_collate",
        "with_collate"
      ]
    },
    {
      "page": "with_connection",
      "title": "Connections which close themselves",
      "topics": [
        "local_connection",
        "with_connection"
      ]
    },
    {
      "page": "with_db_connection",
      "title": "DBMS Connections which disconnect themselves.",
      "topics": [
        "local_db_connection",
        "with_db_connection"
      ]
    },
    {
      "page": "with_dir",
      "title": "Working directory",
      "topics": [
        "local_dir",
        "with_dir"
      ]
    },
    {
      "page": "with_envvar",
      "title": "Environment variables",
      "topics": [
        "local_envvar",
        "with_envvar"
      ]
    },
    {
      "page": "with_file",
      "title": "Files which delete themselves",
      "topics": [
        "local_file",
        "with_file"
      ]
    },
    {
      "page": "with_gctorture2",
      "title": "Torture Garbage Collector",
      "topics": [
        "with_gctorture2"
      ]
    },
    {
      "page": "with_language",
      "title": "Language",
      "topics": [
        "local_language",
        "with_language"
      ]
    },
    {
      "page": "with_libpaths",
      "title": "Library paths",
      "concept": [
        "libpaths"
      ],
      "topics": [
        "local_libpaths",
        "with_libpaths"
      ]
    },
    {
      "page": "with_locale",
      "title": "Locale settings",
      "topics": [
        "local_locale",
        "with_locale"
      ]
    },
    {
      "page": "with_makevars",
      "title": "Makevars variables",
      "topics": [
        "local_makevars",
        "with_makevars"
      ]
    },
    {
      "page": "with_options",
      "title": "Options",
      "topics": [
        "local_options",
        "with_options"
      ]
    },
    {
      "page": "with_package",
      "title": "Execute code with a modified search path",
      "topics": [
        "local_environment",
        "local_namespace",
        "local_package",
        "with_environment",
        "with_namespace",
        "with_package"
      ]
    },
    {
      "page": "with_par",
      "title": "Graphics parameters",
      "topics": [
        "local_par",
        "with_par"
      ]
    },
    {
      "page": "with_path",
      "title": "PATH environment variable",
      "topics": [
        "local_path",
        "with_path"
      ]
    },
    {
      "page": "with_rng_version",
      "title": "RNG version",
      "topics": [
        "local_rng_version",
        "with_rng_version"
      ]
    },
    {
      "page": "with_seed",
      "title": "Random seed",
      "topics": [
        "local_preserve_seed",
        "local_seed",
        "with_preserve_seed",
        "with_seed"
      ]
    },
    {
      "page": "with_sink",
      "title": "Output redirection",
      "topics": [
        "local_message_sink",
        "local_output_sink",
        "with_message_sink",
        "with_output_sink",
        "with_sink"
      ]
    },
    {
      "page": "with_temp_libpaths",
      "title": "Library paths",
      "concept": [
        "libpaths"
      ],
      "topics": [
        "local_temp_libpaths",
        "with_temp_libpaths"
      ]
    },
    {
      "page": "with_tempfile",
      "title": "Temporary files and directories",
      "topics": [
        "local_tempdir",
        "local_tempfile",
        "with_tempdir",
        "with_tempfile"
      ]
    },
    {
      "page": "with_timezone",
      "title": "Time zone",
      "topics": [
        "local_timezone",
        "with_timezone"
      ]
    },
    {
      "page": "withr",
      "title": "Execute code in temporarily altered environment",
      "topics": [
        "withr-package",
        "withr"
      ]
    }
  ],
  "_pkglogo": "https://github.com/r-lib/withr/raw/HEAD/man/figures/logo.png",
  "_readme": "https://github.com/r-lib/withr/raw/HEAD/README.md",
  "_rundeps": [],
  "_vignettes": [
    {
      "source": "withr.Rmd",
      "filename": "withr.html",
      "title": "Changing and restoring state",
      "engine": "knitr::rmarkdown",
      "headings": [
        "It's dangerous to change state",
        "The base solution: on.exit()",
        "defer() is the foundation of withr",
        "Last-in, first-out",
        "\"Local\" functions (and \"with\" functions)",
        "Deferring events on the global environment"
      ],
      "created": "2017-12-19 14:14:44",
      "modified": "2024-01-17 08:12:36",
      "commits": 4
    }
  ],
  "_score": 18.198773799135,
  "_indexed": true,
  "_nocasepkg": "withr",
  "_universes": [
    "r-lib",
    "lionel-"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "3.0.2.9001",
      "date": "2026-05-19T14:03:44.000Z",
      "distro": "noble",
      "commit": "91e1ac602ae693696f5aa58a41a261b3123f8233",
      "fileid": "bbd2043ab6a16de8b95d90159ce2263852ee99f408eba93a868a5074048b420a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-lib/actions/runs/26102087891"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "3.0.2.9001",
      "date": "2026-05-19T14:03:38.000Z",
      "distro": "noble",
      "commit": "91e1ac602ae693696f5aa58a41a261b3123f8233",
      "fileid": "317204c8099ffb0ab0ad1e405b71380d009dd83fcd1836ec7c81489e93798a7a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-lib/actions/runs/26102087891"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "3.0.2.9001",
      "date": "2026-05-19T14:03:15.000Z",
      "commit": "91e1ac602ae693696f5aa58a41a261b3123f8233",
      "fileid": "c869b2a39dd2b0b2db042280fd1795fe2685a210d93ba82f9bcfd6ad0ba359ac",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-lib/actions/runs/26102087891"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "3.0.2.9001",
      "date": "2026-05-19T14:03:25.000Z",
      "commit": "91e1ac602ae693696f5aa58a41a261b3123f8233",
      "fileid": "7c5694b70e6e2bc3350502ab9d9ecdf33dbd9f4d53f6813ca7f4f6624981bf5a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-lib/actions/runs/26102087891"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "3.0.2.9001",
      "date": "2026-05-19T14:02:57.000Z",
      "commit": "91e1ac602ae693696f5aa58a41a261b3123f8233",
      "fileid": "2c6d13a1c53bb924db218ed3dfa3a36ddf676f73af9972afc142adfa9b7fdbd3",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-lib/actions/runs/26102087891"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "3.0.2.9001",
      "date": "2026-05-19T14:02:51.000Z",
      "commit": "91e1ac602ae693696f5aa58a41a261b3123f8233",
      "fileid": "406669928531801db3028640636b69f0d4dd2c31974ad7b8412dd0ac65ee1bcc",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-lib/actions/runs/26102087891"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "3.0.2.9001",
      "date": "2026-05-19T14:02:52.000Z",
      "commit": "91e1ac602ae693696f5aa58a41a261b3123f8233",
      "fileid": "b6983ed4fc6728b892471d93bc31ca9736ff0a1d6ad04df4b713cd46a743e219",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-lib/actions/runs/26102087891"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "3.0.2.9001",
      "date": "2026-05-21T23:43:41.000Z",
      "commit": "91e1ac602ae693696f5aa58a41a261b3123f8233",
      "fileid": "0af5e9994810235f3089d0ec08bdc8f7943ec94a318bba2619b8ee80bf0a32a6",
      "status": "success",
      "buildurl": "https://github.com/r-universe/r-lib/actions/runs/26102087891"
    }
  ]
}