{
  "_id": "6a102eb6acfb0bcc41c9466d",
  "Package": "xpectr",
  "Title": "Generates Expectations for 'testthat' Unit Testing",
  "Version": "0.4.5",
  "Authors@R": "c(person(given = \"Ludvig Renbo\",\nfamily = \"Olsen\",\nrole = c(\"aut\", \"cre\"),\nemail = \"r-pkgs@ludvigolsen.dk\",\ncomment = c(ORCID = \"0009-0006-6798-7454\")),\nperson(given = \"R. Mark\",\nfamily = \"Sharp\",\nrole = c(\"ctb\")))",
  "Description": "Helps systematize and ease the process of building unit\ntests with the 'testthat' package by providing tools for\ngenerating expectations.",
  "License": "MIT + file LICENSE",
  "URL": "https://github.com/ludvigolsen/xpectr",
  "BugReports": "https://github.com/ludvigolsen/xpectr/issues",
  "RdMacros": "lifecycle",
  "Encoding": "UTF-8",
  "Roxygen": "list(markdown = TRUE)",
  "RoxygenNote": "7.3.3",
  "VignetteBuilder": "knitr",
  "Config/pak/sysreqs": "cmake make libuv1-dev libx11-dev",
  "Repository": "https://ludvigolsen.r-universe.dev",
  "Date/Publication": "2026-05-12 20:52:05 UTC",
  "RemoteUrl": "https://github.com/ludvigolsen/xpectr",
  "RemoteRef": "HEAD",
  "RemoteSha": "c72c0007460347063cce501fa1dc8453b98fc9de",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-05-12 21:16:52 UTC",
    "User": "root"
  },
  "Author": "Ludvig Renbo Olsen [aut, cre] (ORCID:\n<https://orcid.org/0009-0006-6798-7454>),\nR. Mark Sharp [ctb]",
  "Maintainer": "Ludvig Renbo Olsen <r-pkgs@ludvigolsen.dk>",
  "MD5sum": "08b009e7cd1dd1e164ec11dafd18b817",
  "_user": "ludvigolsen",
  "_type": "src",
  "_file": "xpectr_0.4.5.tar.gz",
  "_fileid": "2606d6dcaa4f1364f87ab04cb52d2ddc310156235b203ce9f9429fa6b8bf7174",
  "_filesize": 363238,
  "_sha256": "2606d6dcaa4f1364f87ab04cb52d2ddc310156235b203ce9f9429fa6b8bf7174",
  "_created": "2026-05-12T21:16:52.000Z",
  "_published": "2026-05-22T10:23:50.650Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 77361083975,
      "time": 138,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "6956117604"
    },
    {
      "job": 77361083688,
      "time": 136,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6956114870"
    },
    {
      "job": 77361083921,
      "time": 138,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "6956115630"
    },
    {
      "job": 77361084008,
      "time": 134,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6956114206"
    },
    {
      "job": 77361083037,
      "time": 167,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6956071170"
    },
    {
      "job": 77361083238,
      "time": 104,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7158264998"
    },
    {
      "job": 77361083691,
      "time": 104,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "6956105008"
    },
    {
      "job": 77361083718,
      "time": 95,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "6956102137"
    },
    {
      "job": 77361083777,
      "time": 89,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6956100421"
    }
  ],
  "_buildurl": "https://github.com/r-universe/ludvigolsen/actions/runs/25762569974",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/ludvigolsen/xpectr",
  "_commit": {
    "id": "c72c0007460347063cce501fa1dc8453b98fc9de",
    "author": "Ludvig <ludvig@clin.au.dk>",
    "committer": "Ludvig <ludvig@clin.au.dk>",
    "message": "bump versions\n",
    "time": 1778619125
  },
  "_maintainer": {
    "name": "Ludvig Renbo Olsen",
    "email": "r-pkgs@ludvigolsen.dk"
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 3.5.0",
      "role": "Depends"
    },
    {
      "package": "clipr",
      "version": ">= 0.7.0",
      "role": "Imports"
    },
    {
      "package": "checkmate",
      "version": ">= 2.0.0",
      "role": "Imports"
    },
    {
      "package": "dplyr",
      "role": "Imports"
    },
    {
      "package": "fansi",
      "version": ">= 0.4.1",
      "role": "Imports"
    },
    {
      "package": "lifecycle",
      "role": "Imports"
    },
    {
      "package": "plyr",
      "role": "Imports"
    },
    {
      "package": "rlang",
      "role": "Imports"
    },
    {
      "package": "rstudioapi",
      "version": ">= 0.10",
      "role": "Imports"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "testthat",
      "version": ">= 2.3.1",
      "role": "Imports"
    },
    {
      "package": "tibble",
      "role": "Imports"
    },
    {
      "package": "utils",
      "role": "Imports"
    },
    {
      "package": "withr",
      "version": ">= 2.0.0",
      "role": "Imports"
    },
    {
      "package": "data.table",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    }
  ],
  "_owner": "ludvigolsen",
  "_selfowned": true,
  "_usedby": 1,
  "_updates": [
    {
      "week": "2026-20",
      "n": 3
    }
  ],
  "_tags": [],
  "_stars": 37,
  "_contributors": [
    {
      "user": "ludvigolsen",
      "count": 139,
      "uuid": 22819047
    }
  ],
  "_userbio": {
    "uuid": 22819047,
    "type": "user",
    "name": "Ludvig Renbo Olsen",
    "description": "Postdoc at the Department of Molecular Medicine (MOMA), Aarhus University Hospital. PhD in Bioinformatics. MSc Cognitive Science."
  },
  "_downloads": {
    "count": 353,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/xpectr"
  },
  "_devurl": "https://github.com/ludvigolsen/xpectr",
  "_searchresults": 64,
  "_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/xpectr.html",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/ludvigolsen/xpectr",
  "_realowner": "ludvigolsen",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.1.0",
      "date": "2020-02-29"
    },
    {
      "version": "0.1.1",
      "date": "2020-03-07"
    },
    {
      "version": "0.2.0",
      "date": "2020-03-15"
    },
    {
      "version": "0.3.0",
      "date": "2020-03-31"
    },
    {
      "version": "0.4.0",
      "date": "2020-06-18"
    },
    {
      "version": "0.4.1",
      "date": "2021-10-03"
    },
    {
      "version": "0.4.2",
      "date": "2022-01-20"
    },
    {
      "version": "0.4.3",
      "date": "2022-11-18"
    },
    {
      "version": "0.4.4",
      "date": "2025-03-03"
    }
  ],
  "_exports": [
    "assertCollectionAddin",
    "capture_parse_eval_side_effects",
    "capture_side_effects",
    "dputSelectedAddin",
    "element_classes",
    "element_lengths",
    "element_types",
    "gxs_function",
    "gxs_selection",
    "initializeGXSFunctionAddin",
    "initializeTestthatAddin",
    "insertExpectationsAddin",
    "insertExpectationsCopyEnvAddin",
    "message_if",
    "navigateTestFileAddin",
    "num_total_elements",
    "prepare_insertion",
    "set_test_seed",
    "simplified_formals",
    "smpl",
    "stop_if",
    "strip",
    "strip_msg",
    "suppress_mw",
    "warn_if",
    "wrapStringAddin"
  ],
  "_help": [
    {
      "page": "xpectr-package",
      "title": "xpectr: A package for generating tests for 'testthat' unit testing",
      "topics": [
        "xpectr-package",
        "xpectr"
      ]
    },
    {
      "page": "assertCollectionAddin",
      "title": "Inserts code for a checkmate assert collection",
      "concept": [
        "addins"
      ],
      "topics": [
        "assertCollectionAddin"
      ]
    },
    {
      "page": "capture_parse_eval_side_effects",
      "title": "Capture side effects from parse eval",
      "concept": [
        "capturers"
      ],
      "topics": [
        "capture_parse_eval_side_effects"
      ]
    },
    {
      "page": "capture_side_effects",
      "title": "Capture side effects",
      "concept": [
        "capturers"
      ],
      "topics": [
        "capture_side_effects"
      ]
    },
    {
      "page": "dputSelectedAddin",
      "title": "Replaces selected code with its dput() output",
      "concept": [
        "addins"
      ],
      "topics": [
        "dputSelectedAddin"
      ]
    },
    {
      "page": "element_classes",
      "title": "Gets the class of each element",
      "concept": [
        "element descriptors"
      ],
      "topics": [
        "element_classes"
      ]
    },
    {
      "page": "element_lengths",
      "title": "Gets the length of each element",
      "concept": [
        "element descriptors"
      ],
      "topics": [
        "element_lengths"
      ]
    },
    {
      "page": "element_types",
      "title": "Gets the type of each element",
      "concept": [
        "element descriptors"
      ],
      "topics": [
        "element_types"
      ]
    },
    {
      "page": "gxs_function",
      "title": "Generate testhat expectations for argument values in a function",
      "concept": [
        "expectation generators"
      ],
      "topics": [
        "gxs_function"
      ]
    },
    {
      "page": "gxs_selection",
      "title": "Generate testhat expectations from selection",
      "concept": [
        "expectation generators"
      ],
      "topics": [
        "gxs_selection"
      ]
    },
    {
      "page": "initializeGXSFunctionAddin",
      "title": "Initialize 'gxs_function()' call",
      "concept": [
        "addins",
        "expectation generators"
      ],
      "topics": [
        "initializeGXSFunctionAddin"
      ]
    },
    {
      "page": "initializeTestthatAddin",
      "title": "Initializes 'test_that()' call",
      "concept": [
        "addins"
      ],
      "topics": [
        "initializeTestthatAddin"
      ]
    },
    {
      "page": "insertExpectationsAddin",
      "title": "Creates testthat tests for selected code",
      "concept": [
        "addins",
        "expectation generators"
      ],
      "topics": [
        "insertExpectationsAddin",
        "insertExpectationsCopyEnvAddin"
      ]
    },
    {
      "page": "navigateTestFileAddin",
      "title": "Navigates to test file",
      "concept": [
        "addins"
      ],
      "topics": [
        "navigateTestFileAddin"
      ]
    },
    {
      "page": "num_total_elements",
      "title": "Total number of elements",
      "concept": [
        "element descriptors"
      ],
      "topics": [
        "num_total_elements"
      ]
    },
    {
      "page": "prepare_insertion",
      "title": "Prepare expectations for insertion",
      "concept": [
        "inserters"
      ],
      "topics": [
        "prepare_insertion"
      ]
    },
    {
      "page": "set_test_seed",
      "title": "Set random seed for unit tests",
      "topics": [
        "set_test_seed"
      ]
    },
    {
      "page": "simplified_formals",
      "title": "Extract and simplify a function's formal arguments",
      "topics": [
        "simplified_formals"
      ]
    },
    {
      "page": "smpl",
      "title": "Random sampling",
      "topics": [
        "smpl"
      ]
    },
    {
      "page": "stop_if",
      "title": "Simple side effect functions",
      "topics": [
        "message_if",
        "stop_if",
        "warn_if"
      ]
    },
    {
      "page": "strip",
      "title": "Strip strings of non-alphanumeric characters",
      "concept": [
        "strippers"
      ],
      "topics": [
        "strip"
      ]
    },
    {
      "page": "strip_msg",
      "title": "Strip side-effect messages of non-alphanumeric characters and rethrow them",
      "concept": [
        "strippers"
      ],
      "topics": [
        "strip_msg"
      ]
    },
    {
      "page": "suppress_mw",
      "title": "Suppress warnings and messages",
      "topics": [
        "suppress_mw"
      ]
    },
    {
      "page": "wrapStringAddin",
      "title": "Wraps the selection with paste0",
      "concept": [
        "addins"
      ],
      "topics": [
        "wrapStringAddin"
      ]
    }
  ],
  "_readme": "https://github.com/ludvigolsen/xpectr/raw/HEAD/README.md",
  "_rundeps": [
    "backports",
    "brio",
    "callr",
    "checkmate",
    "cli",
    "clipr",
    "crayon",
    "desc",
    "diffobj",
    "dplyr",
    "evaluate",
    "fansi",
    "fs",
    "generics",
    "glue",
    "jsonlite",
    "lifecycle",
    "magrittr",
    "pillar",
    "pkgbuild",
    "pkgconfig",
    "pkgload",
    "plyr",
    "praise",
    "processx",
    "ps",
    "R6",
    "Rcpp",
    "rlang",
    "rprojroot",
    "rstudioapi",
    "testthat",
    "tibble",
    "tidyselect",
    "utf8",
    "vctrs",
    "waldo",
    "withr"
  ],
  "_vignettes": [
    {
      "source": "readme.Rmd",
      "filename": "readme.html",
      "title": "README for xpectr",
      "author": "Ludvig Renbo Olsen",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Installation",
        "Main functions",
        "Generator functions",
        "Functions for use in tests",
        "Helper functions",
        "Addins",
        "Using in packages",
        "Examples",
        "gxs_selection",
        "Selection is a vector",
        "Numeric vector",
        "Factor",
        "Long vector (sampling)",
        "Selection is a data frame",
        "Selection is a function call with side effects",
        "gxs_function",
        "RStudio Addins",
        "How to set up a key command in RStudio",
        "initializeGXSFunctionAddin",
        "wrapStringAddin",
        "initializeTestthatAddin",
        "assertCollectionAddin",
        "dputSelectedAddin",
        "navigateTestFileAddin"
      ],
      "created": "2020-01-29 22:09:46",
      "modified": "2022-11-18 12:40:55",
      "commits": 8
    }
  ],
  "_score": 6.550472957106564,
  "_indexed": true,
  "_nocasepkg": "xpectr",
  "_universes": [
    "ludvigolsen"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.4.5",
      "date": "2026-05-12T21:19:11.000Z",
      "distro": "noble",
      "commit": "c72c0007460347063cce501fa1dc8453b98fc9de",
      "fileid": "23c516ef73fd8979a57ed206d0aee477b31fa07e0d9aff177bb951d30a19bce0",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ludvigolsen/actions/runs/25762569974"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "0.4.5",
      "date": "2026-05-12T21:19:03.000Z",
      "distro": "noble",
      "commit": "c72c0007460347063cce501fa1dc8453b98fc9de",
      "fileid": "dd1f6d5c0ab1cb456e980a37dd13bec145869f935432f143b09f16b22d65f4c6",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ludvigolsen/actions/runs/25762569974"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.4.5",
      "date": "2026-05-12T21:19:03.000Z",
      "commit": "c72c0007460347063cce501fa1dc8453b98fc9de",
      "fileid": "0f4e149dcde1a4781002166a600a77b2c77c80bbeb82ad556db2b3af624bd584",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ludvigolsen/actions/runs/25762569974"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "0.4.5",
      "date": "2026-05-12T21:18:59.000Z",
      "commit": "c72c0007460347063cce501fa1dc8453b98fc9de",
      "fileid": "c693478565db5823f0712fc3a5a55e673644b8a89cbb6f76663d832406049ed7",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ludvigolsen/actions/runs/25762569974"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.4.5",
      "date": "2026-05-12T21:18:11.000Z",
      "commit": "c72c0007460347063cce501fa1dc8453b98fc9de",
      "fileid": "fe6174228a2af608c003189c4c45cea66d52a6d72178bb066661938956ccb495",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ludvigolsen/actions/runs/25762569974"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.4.5",
      "date": "2026-05-12T21:18:15.000Z",
      "commit": "c72c0007460347063cce501fa1dc8453b98fc9de",
      "fileid": "c78a12665c91e6f5bdffb38bb12f901ef1a6d676d908519e30ba0593a9a6091c",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ludvigolsen/actions/runs/25762569974"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "0.4.5",
      "date": "2026-05-12T21:18:09.000Z",
      "commit": "c72c0007460347063cce501fa1dc8453b98fc9de",
      "fileid": "dd674f6f0850e167d5ee6055d901b80d8d3d5c37af292aa24de8e6b5b9d57fe2",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ludvigolsen/actions/runs/25762569974"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.4.5",
      "date": "2026-05-22T10:23:33.000Z",
      "commit": "c72c0007460347063cce501fa1dc8453b98fc9de",
      "fileid": "4d38585e525f3dabc7a709bfbb43caec1e0f8fe2a4312c018974e14c1a65ebb5",
      "status": "success",
      "buildurl": "https://github.com/r-universe/ludvigolsen/actions/runs/25762569974"
    }
  ]
}