{
  "_id": "6a0f7822acfb0bcc41c623a7",
  "Package": "nc",
  "Authors@R": "c(\nperson(\"Toby\", \"Hocking\",\nemail=\"toby.hocking@r-project.org\",\nrole=c(\"aut\", \"cre\")))",
  "Version": "2026.4.20",
  "License": "GPL-3",
  "Title": "Named Capture to Data Tables",
  "Description": "User-friendly functions for extracting a data table (row\nfor each match, column for each group) from non-tabular text\ndata using regular expressions, and for melting columns that\nmatch a regular expression. Patterns are defined using a\nreadable syntax that makes it easy to build complex patterns in\nterms of simpler, re-usable sub-patterns. Named R arguments are\ntranslated to column names in the output; capture groups\nwithout names are used internally in order to provide a\nstandard interface to three regular expression 'C' libraries\n('PCRE', 'RE2', 'ICU'). Output can also include numeric columns\nvia user-specified type conversion functions.",
  "VignetteBuilder": "knitr",
  "URL": "https://github.com/tdhock/nc",
  "BugReports": "https://github.com/tdhock/nc/issues",
  "Repository": "https://tdhock.r-universe.dev",
  "Date/Publication": "2026-04-21 02:12:09 UTC",
  "RemoteUrl": "https://github.com/tdhock/nc",
  "RemoteRef": "HEAD",
  "RemoteSha": "1b6891de2cda65e7dc47fb3982772501c8d1cdd8",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-05-21 06:02:24 UTC",
    "User": "root"
  },
  "Author": "Toby Hocking [aut, cre]",
  "Maintainer": "Toby Hocking <toby.hocking@r-project.org>",
  "MD5sum": "985fd5965da23df25940dd10a6d9874b",
  "_user": "tdhock",
  "_type": "src",
  "_file": "nc_2026.4.20.tar.gz",
  "_fileid": "877a708e7c7235544bd1580358fd662156a89d75b9b86a523ccb066f1739524e",
  "_filesize": 1401519,
  "_sha256": "877a708e7c7235544bd1580358fd662156a89d75b9b86a523ccb066f1739524e",
  "_created": "2026-05-21T06:02:24.000Z",
  "_published": "2026-05-21T21:24:50.655Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 77271695768,
      "time": 143,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7128392016"
    },
    {
      "job": 77271696377,
      "time": 140,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7128391287"
    },
    {
      "job": 77271696146,
      "time": 123,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7128387637"
    },
    {
      "job": 77271695800,
      "time": 92,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7128380517"
    },
    {
      "job": 77271695448,
      "time": 197,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7128359198"
    },
    {
      "job": 77271695364,
      "time": 116,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7147552858"
    },
    {
      "job": 77271696162,
      "time": 111,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7128384823"
    },
    {
      "job": 77271695874,
      "time": 118,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7128386403"
    },
    {
      "job": 77271695835,
      "time": 106,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7128383617"
    }
  ],
  "_buildurl": "https://github.com/r-universe/tdhock/actions/runs/26208387452",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/tdhock/nc",
  "_commit": {
    "id": "1b6891de2cda65e7dc47fb3982772501c8d1cdd8",
    "author": "Toby Dylan Hocking <toby.hocking@r-project.org>",
    "committer": "Toby Dylan Hocking <toby.hocking@r-project.org>",
    "message": "link\n",
    "time": 1776737529
  },
  "_maintainer": {
    "name": "Toby Hocking",
    "email": "toby.hocking@r-project.org",
    "login": "tdhock",
    "description": "",
    "uuid": 932850
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 2.14",
      "role": "Depends"
    },
    {
      "package": "data.table",
      "version": ">= 1.15.0",
      "role": "Imports"
    },
    {
      "package": "testthat",
      "role": "Suggests"
    },
    {
      "package": "re2",
      "role": "Suggests"
    },
    {
      "package": "stringi",
      "role": "Suggests"
    },
    {
      "package": "ggplot2",
      "role": "Suggests"
    },
    {
      "package": "tidyr",
      "version": ">= 1.0.0",
      "role": "Suggests"
    },
    {
      "package": "cdata",
      "role": "Suggests"
    },
    {
      "package": "reshape2",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "markdown",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "R.utils",
      "role": "Suggests"
    },
    {
      "package": "covr",
      "role": "Suggests"
    },
    {
      "package": "arrow",
      "role": "Suggests"
    }
  ],
  "_owner": "tdhock",
  "_selfowned": true,
  "_usedby": 1,
  "_updates": [
    {
      "week": "2025-22",
      "n": 4
    },
    {
      "week": "2026-08",
      "n": 2
    },
    {
      "week": "2026-17",
      "n": 2
    }
  ],
  "_tags": [],
  "_stars": 19,
  "_contributors": [
    {
      "user": "tdhock",
      "count": 364,
      "uuid": 932850
    }
  ],
  "_userbio": {
    "uuid": 932850,
    "type": "user",
    "name": "Toby Dylan Hocking"
  },
  "_downloads": {
    "count": 693,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/nc"
  },
  "_devurl": "https://github.com/tdhock/nc",
  "_searchresults": 62,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/nc.html",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/tdhock/nc",
  "_realowner": "tdhock",
  "_cranurl": true,
  "_releases": [
    {
      "version": "2019.9.16",
      "date": "2019-09-23"
    },
    {
      "version": "2019.10.19",
      "date": "2019-10-28"
    },
    {
      "version": "2020.1.16",
      "date": "2020-02-01"
    },
    {
      "version": "2020.2.27",
      "date": "2020-03-04"
    },
    {
      "version": "2020.3.23",
      "date": "2020-03-25"
    },
    {
      "version": "2020.5.13",
      "date": "2020-05-14"
    },
    {
      "version": "2020.8.6",
      "date": "2020-08-10"
    },
    {
      "version": "2023.5.1",
      "date": "2023-05-02"
    },
    {
      "version": "2023.8.24",
      "date": "2023-08-31"
    },
    {
      "version": "2024.1.31",
      "date": "2024-02-01"
    },
    {
      "version": "2024.2.21",
      "date": "2024-02-22"
    },
    {
      "version": "2024.9.20",
      "date": "2024-09-20"
    },
    {
      "version": "2025.1.21",
      "date": "2025-01-21"
    },
    {
      "version": "2025.3.24",
      "date": "2025-04-09"
    },
    {
      "version": "2026.2.20",
      "date": "2026-02-26"
    },
    {
      "version": "2026.4.20",
      "date": "2026-04-21"
    }
  ],
  "_exports": [
    "alevels",
    "alternatives",
    "alternatives_with_shared_groups",
    "altlist",
    "before_match",
    "capture_all_str",
    "capture_first_df",
    "capture_first_glob",
    "capture_first_vec",
    "capture_longer_spec",
    "capture_melt_multiple",
    "capture_melt_single",
    "field",
    "group",
    "measure",
    "quantifier",
    "var_args_list"
  ],
  "_help": [
    {
      "page": "alevels",
      "title": "Alternative levels",
      "topics": [
        "alevels"
      ]
    },
    {
      "page": "alternatives",
      "title": "alternatives",
      "topics": [
        "alternatives"
      ]
    },
    {
      "page": "alternatives_with_shared_groups",
      "title": "alternatives with shared groups",
      "topics": [
        "alternatives_with_shared_groups"
      ]
    },
    {
      "page": "altlist",
      "title": "altlist",
      "topics": [
        "altlist"
      ]
    },
    {
      "page": "apply_type_funs",
      "title": "apply type funs",
      "topics": [
        "apply_type_funs"
      ]
    },
    {
      "page": "before_match",
      "title": "before match",
      "topics": [
        "before_match"
      ]
    },
    {
      "page": "capture_all_str",
      "title": "Capture all matches in a single subject string",
      "topics": [
        "capture_all_str"
      ]
    },
    {
      "page": "capture_first_df",
      "title": "Capture first match in columns of a data frame",
      "topics": [
        "capture_first_df"
      ]
    },
    {
      "page": "capture_first_glob",
      "title": "capture first glob",
      "topics": [
        "capture_first_glob"
      ]
    },
    {
      "page": "capture_first_vec",
      "title": "Capture first match in each character vector element",
      "topics": [
        "capture_first_vec",
        "nc"
      ]
    },
    {
      "page": "capture_longer_spec",
      "title": "capture longer spec",
      "topics": [
        "capture_longer_spec"
      ]
    },
    {
      "page": "capture_melt_multiple",
      "title": "Capture and melt into multiple columns",
      "topics": [
        "capture_melt_multiple"
      ]
    },
    {
      "page": "capture_melt_single",
      "title": "Capture and melt into a single column",
      "topics": [
        "capture_melt_single"
      ]
    },
    {
      "page": "check_df_names",
      "title": "check df names",
      "topics": [
        "check_df_names"
      ]
    },
    {
      "page": "check_names",
      "title": "check names",
      "topics": [
        "check_names"
      ]
    },
    {
      "page": "collapse_some",
      "title": "collapse some",
      "topics": [
        "collapse_some"
      ]
    },
    {
      "page": "field",
      "title": "Capture a field",
      "topics": [
        "field"
      ]
    },
    {
      "page": "group",
      "title": "Capture group",
      "topics": [
        "group"
      ]
    },
    {
      "page": "measure",
      "title": "measure",
      "topics": [
        "measure"
      ]
    },
    {
      "page": "measure_multiple",
      "title": "measure multiple",
      "topics": [
        "measure_multiple"
      ]
    },
    {
      "page": "measure_single",
      "title": "measure single",
      "topics": [
        "measure_single"
      ]
    },
    {
      "page": "melt_list",
      "title": "melt list",
      "topics": [
        "melt_list"
      ]
    },
    {
      "page": "only_captures",
      "title": "only captures",
      "topics": [
        "only_captures"
      ]
    },
    {
      "page": "quantifier",
      "title": "quantifier",
      "topics": [
        "quantifier"
      ]
    },
    {
      "page": "stop_for_capture_same_as_id",
      "title": "stop for capture same as id",
      "topics": [
        "stop_for_capture_same_as_id"
      ]
    },
    {
      "page": "stop_for_engine",
      "title": "stop for engine",
      "topics": [
        "stop_for_engine"
      ]
    },
    {
      "page": "stop_for_subject",
      "title": "stop for subject",
      "topics": [
        "stop_for_subject"
      ]
    },
    {
      "page": "subject_var_args",
      "title": "subject var args",
      "topics": [
        "subject_var_args"
      ]
    },
    {
      "page": "try_or_stop_print_pattern",
      "title": "try or stop print pattern",
      "topics": [
        "try_or_stop_print_pattern"
      ]
    },
    {
      "page": "var_args_list",
      "title": "var args list",
      "topics": [
        "var_args_list"
      ]
    }
  ],
  "_rundeps": [
    "data.table"
  ],
  "_vignettes": [
    {
      "source": "v2-capture-all.Rmd",
      "filename": "v2-capture-all.html",
      "title": "Capture all matches in a single subject string",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Match all tracks in the text file",
        "Match all fields in each track",
        "Match all tracks and some fields with one regex",
        "Parsing SweeD output files"
      ],
      "created": "2019-09-04 14:16:56",
      "modified": "2024-03-31 05:24:21",
      "commits": 6
    },
    {
      "source": "v1-capture-first.Rmd",
      "filename": "v1-capture-first.html",
      "title": "Capture first match",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Capture first match in each character vector element",
        "View generated regex",
        "Error/NA if any subjects do not match",
        "Other regex engines",
        "Capture first match from one or more character columns in a table",
        "Complex example: fsa file names"
      ],
      "created": "2019-09-04 14:16:56",
      "modified": "2024-03-31 05:24:21",
      "commits": 9
    },
    {
      "source": "v3-capture-melt.Rmd",
      "filename": "v3-capture-melt.html",
      "title": "Capture melt",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Reshaping several input columns into a single output column",
        "Reshaping several input columns into multiple output columns",
        "Melting WHO data with a more complex pattern",
        "Melting monthly Eurostat data",
        "Melting into multiple output columns with missing input columns",
        "Multiple output columns of different types"
      ],
      "created": "2019-10-25 23:57:43",
      "modified": "2024-03-31 05:24:21",
      "commits": 11
    },
    {
      "source": "v4-comparisons.Rmd",
      "filename": "v4-comparisons.html",
      "title": "Comparisons with other packages",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Are sepals larger or smaller than petals in the iris data?",
        "Comparing dimensions in iris data",
        "Do columns need to be sorted?",
        "Melting into a single output column, who data",
        "Melting a wider iris back to original",
        "Lots of column types",
        "family data",
        "histogram of iris",
        "single output column simple type conversion",
        "Multiple output columns of different types"
      ],
      "created": "2019-10-25 23:57:43",
      "modified": "2024-03-31 05:24:21",
      "commits": 9
    },
    {
      "source": "v5-helpers.Rmd",
      "filename": "v5-helpers.html",
      "title": "Helper functions",
      "engine": "knitr::rmarkdown",
      "headings": [
        "nc::field for reducing repetition",
        "nc::quantifier for fewer parentheses",
        "nc::alternatives for simplified alternation",
        "nc::alternatives_with_shared_groups for alternatives with identical named sub-pattern groups"
      ],
      "created": "2021-05-11 02:11:24",
      "modified": "2024-09-20 16:33:15",
      "commits": 5
    },
    {
      "source": "v0-overview.Rmd",
      "filename": "v0-overview.html",
      "title": "Overview of nc functionality",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Capture first match in several subjects",
        "Capture all matches in a single subject",
        "Reshape a data table with regularly named columns",
        "Reading regularly named data files",
        "Helper functions for defining complex pattterns"
      ],
      "created": "2021-05-11 02:13:25",
      "modified": "2024-09-20 03:52:00",
      "commits": 6
    },
    {
      "source": "v7-capture-glob.Rmd",
      "filename": "v7-capture-glob.html",
      "title": "Reading regularly named files",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Example 0: iris data, one file per species",
        "Example 1: four files, two capture groups, custom read function",
        "Why not base R?",
        "Example 3: Hive partition file names",
        "Example 4: pattern with two more capture groups",
        "Example 5: parsing non-CSV data",
        "Conclusion"
      ],
      "created": "2024-01-05 06:10:25",
      "modified": "2024-08-27 02:36:13",
      "commits": 6
    },
    {
      "source": "v6-engines.Rmd",
      "filename": "v6-engines.html",
      "title": "Uniform interface to three regex engines",
      "engine": "knitr::rmarkdown",
      "headings": [],
      "created": "2021-05-11 02:13:25",
      "modified": "2026-02-21 06:28:58",
      "commits": 4
    }
  ],
  "_score": 6.928477786882351,
  "_indexed": true,
  "_nocasepkg": "nc",
  "_universes": [
    "tdhock"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "2026.4.20",
      "date": "2026-05-21T06:04:37.000Z",
      "distro": "noble",
      "commit": "1b6891de2cda65e7dc47fb3982772501c8d1cdd8",
      "fileid": "6a89a11dfccc31f061863c1513990814360145c0878342da7da7822da2c33f5b",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/tdhock/actions/runs/26208387452"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "2026.4.20",
      "date": "2026-05-21T06:04:35.000Z",
      "distro": "noble",
      "commit": "1b6891de2cda65e7dc47fb3982772501c8d1cdd8",
      "fileid": "3fae0f45b81f5d0374c60aa9de0633107dd44c5934d219b18ada76233201f78a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/tdhock/actions/runs/26208387452"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "2026.4.20",
      "date": "2026-05-21T06:04:19.000Z",
      "commit": "1b6891de2cda65e7dc47fb3982772501c8d1cdd8",
      "fileid": "32d825b8be406abd7e9bbd97f7e0bb5afeda94dd482333a78d0d62e0c3d74b52",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/tdhock/actions/runs/26208387452"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "2026.4.20",
      "date": "2026-05-21T06:03:55.000Z",
      "commit": "1b6891de2cda65e7dc47fb3982772501c8d1cdd8",
      "fileid": "260300d8a34049bd8fba242ac0eff5a213f3103882ebae707a9d4d2c0a0fcf74",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/tdhock/actions/runs/26208387452"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "2026.4.20",
      "date": "2026-05-21T21:24:32.000Z",
      "commit": "1b6891de2cda65e7dc47fb3982772501c8d1cdd8",
      "fileid": "a58c2887eaa63bfdc887afc7da112efebac17266e13dbf29cabb16dcb93c8f65",
      "status": "success",
      "buildurl": "https://github.com/r-universe/tdhock/actions/runs/26208387452"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "2026.4.20",
      "date": "2026-05-21T06:03:42.000Z",
      "commit": "1b6891de2cda65e7dc47fb3982772501c8d1cdd8",
      "fileid": "cc68023d17a9efe44ae23cd40a2933779ed82086d62609fcb08d454cc1bb35b0",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/tdhock/actions/runs/26208387452"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "2026.4.20",
      "date": "2026-05-21T06:03:46.000Z",
      "commit": "1b6891de2cda65e7dc47fb3982772501c8d1cdd8",
      "fileid": "2665ad50768d327dbe8f045326a9609dfb5f7e9a8ad8ae6d393e92f21899b2a1",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/tdhock/actions/runs/26208387452"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "2026.4.20",
      "date": "2026-05-21T06:03:37.000Z",
      "commit": "1b6891de2cda65e7dc47fb3982772501c8d1cdd8",
      "fileid": "2e25ea65d12622142bf008907402afdc8b406295cf1f401c902656fc7868cf66",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/tdhock/actions/runs/26208387452"
    }
  ]
}