{
  "_id": "6a44eadf6ff6f2357551ede9",
  "Package": "withr",
  "Title": "Run Code 'With' Temporarily Modified Global State",
  "Version": "3.0.3.9000",
  "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-06-22 08:59:11 UTC",
  "RemoteUrl": "https://github.com/r-lib/withr",
  "RemoteRef": "HEAD",
  "RemoteSha": "d82e4bc2d69a34f044ad205210e26207bfb8f3e0",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-07-01 10:14:22 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>",
  "_user": "r-lib",
  "_type": "src",
  "_file": "withr_3.0.3.9000.tar.gz",
  "_fileid": "https://r2.ropensci.org/1f7f317fe6e11e3007cc484b369e93f191c07175d3bb8cf86bed003317685bdb",
  "_filesize": 285172,
  "_sha256": "1f7f317fe6e11e3007cc484b369e93f191c07175d3bb8cf86bed003317685bdb",
  "_expires": "2026-10-09T10:24:30.000Z",
  "_created": "2026-07-01T10:14:22.000Z",
  "_published": "2026-07-01T10:24:31.255Z",
  "_jobs": [
    {
      "job": 84508493593,
      "time": 126,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "8006888407"
    },
    {
      "job": 84508493648,
      "time": 124,
      "config": "linux-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "8006887878"
    },
    {
      "job": 84508493645,
      "time": 72,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "8007044421"
    },
    {
      "job": 84508493647,
      "time": 113,
      "config": "macos-release-arm64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "8007059740"
    },
    {
      "job": 84507950066,
      "time": 179,
      "config": "source",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "8006838008"
    },
    {
      "job": 84508493609,
      "time": 93,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "8006875866"
    },
    {
      "job": 84508493637,
      "time": 242,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "8006934008"
    },
    {
      "job": 84508493702,
      "time": 227,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "8006927549"
    },
    {
      "job": 84508493642,
      "time": 242,
      "config": "windows-release",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "8006933526"
    }
  ],
  "_host": "GitHub-Actions",
  "_buildurl": "https://github.com/r-universe/r-lib/actions/runs/28510050414",
  "_status": "success",
  "_upstream": "https://github.com/r-lib/withr",
  "_commit": {
    "id": "d82e4bc2d69a34f044ad205210e26207bfb8f3e0",
    "author": "Lionel Henry <lionel.hry@proton.me>",
    "committer": "Lionel Henry <lionel.hry@proton.me>",
    "message": "Increment version number to 3.0.3.9000\n",
    "time": 1782118751
  },
  "_maintainer": {
    "name": "Lionel Henry",
    "email": "lionel@posit.co",
    "login": "lionel-",
    "description": "",
    "uuid": 4465050
  },
  "_distro": "resolute",
  "_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": 13784,
  "_updates": [
    {
      "week": "2025-43",
      "n": 1
    },
    {
      "week": "2026-02",
      "n": 1
    },
    {
      "week": "2026-21",
      "n": 2
    },
    {
      "week": "2026-25",
      "n": 8
    },
    {
      "week": "2026-26",
      "n": 1
    }
  ],
  "_tags": [
    {
      "name": "v3.0.3",
      "date": "2026-06-17"
    }
  ],
  "_stars": 179,
  "_contributors": [
    {
      "user": "jimhester",
      "count": 256,
      "uuid": 205275
    },
    {
      "user": "lionel-",
      "count": 158,
      "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",
    "followers": 740
  },
  "_downloads": {
    "count": 1800217,
    "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": 2256,
  "_rbuild": "4.6.1",
  "_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",
    "LICENSE",
    "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"
    },
    {
      "version": "3.0.3",
      "date": "2026-06-19"
    }
  ],
  "_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": "2026-06-15 14:31:58",
      "commits": 5
    }
  ],
  "_score": 18.668345202181285,
  "_indexed": true,
  "_nocasepkg": "withr",
  "_universes": [
    "r-lib",
    "lionel-"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "3.0.3.9000",
      "date": "2026-07-01T10:16:30.000Z",
      "distro": "resolute",
      "commit": "d82e4bc2d69a34f044ad205210e26207bfb8f3e0",
      "fileid": "https://r2.ropensci.org/7540ad36882ad357dc1f61194d0ed092943e6bb4b5211fa89f3472f610ea6da1",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-lib/actions/runs/28510050414"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "3.0.3.9000",
      "date": "2026-07-01T10:16:28.000Z",
      "distro": "resolute",
      "commit": "d82e4bc2d69a34f044ad205210e26207bfb8f3e0",
      "fileid": "https://r2.ropensci.org/c73d41305642887501f7ac303b9e0cfe1bba46958bff6667e49a1ae4191b107c",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-lib/actions/runs/28510050414"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "3.0.3.9000",
      "date": "2026-07-01T10:23:19.000Z",
      "commit": "d82e4bc2d69a34f044ad205210e26207bfb8f3e0",
      "fileid": "https://r2.ropensci.org/5712701f64c38f9be3241293bf147002b9d98037196882f978fd9510fd200e74",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-lib/actions/runs/28510050414"
    },
    {
      "r": "4.6.1",
      "os": "mac",
      "version": "3.0.3.9000",
      "date": "2026-07-01T10:23:45.000Z",
      "commit": "d82e4bc2d69a34f044ad205210e26207bfb8f3e0",
      "fileid": "https://r2.ropensci.org/b5124f0e6731f7da3e47f51b51fe0bbb3b1046a1df21e8f607eee97b3294134a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-lib/actions/runs/28510050414"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "3.0.3.9000",
      "date": "2026-07-01T10:16:15.000Z",
      "commit": "d82e4bc2d69a34f044ad205210e26207bfb8f3e0",
      "fileid": "https://r2.ropensci.org/1dc33f47893e09f961d79efdff1259b46ff812b9a19d1c6a7317e91512eab4e4",
      "status": "success",
      "buildurl": "https://github.com/r-universe/r-lib/actions/runs/28510050414"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "3.0.3.9000",
      "date": "2026-07-01T10:18:19.000Z",
      "commit": "d82e4bc2d69a34f044ad205210e26207bfb8f3e0",
      "fileid": "https://r2.ropensci.org/630f4531ce1d3c108eac96f3326ec44222348fbbcfa92a818318e39be5393bc5",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-lib/actions/runs/28510050414"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "3.0.3.9000",
      "date": "2026-07-01T10:18:02.000Z",
      "commit": "d82e4bc2d69a34f044ad205210e26207bfb8f3e0",
      "fileid": "https://r2.ropensci.org/344b3b8e40510985ce26e548b249c276044dba1b68e9831265d13b29e56a04d0",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-lib/actions/runs/28510050414"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "3.0.3.9000",
      "date": "2026-07-01T10:18:16.000Z",
      "commit": "d82e4bc2d69a34f044ad205210e26207bfb8f3e0",
      "fileid": "https://r2.ropensci.org/0f4796adbc9365b8fe828ca5ad2796aeee3d1d62b864c5e3fb7d1978bfe69910",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-lib/actions/runs/28510050414"
    }
  ]
}