{
  "_id": "6b04fa6db6d08ed7e3d871b6",
  "Package": "cohortflow",
  "Title": "Define and Apply Cohort Inclusion/Exclusion Criteria",
  "Version": "0.0.0.9017",
  "Authors@R": "c(person(\"Matthew\", \"Moore\", , \"matthew.moore@auckland.ac.nz\", role = c(\"aut\", \"cre\"),\ncomment = c(ORCID = \"0000-0003-0730-8027\")),\nperson(\"Health Research Council of New Zealand\", role = \"fnd\"))",
  "Description": "Define inclusion and exclusion criteria for cohort studies\nusing formulas or functions, apply them to data, and render the\nresulting attrition flow as CONSORT flow diagrams, tables, or\nnarrative text. Supports hierarchical designs (participants\nnested in clusters/sites) and flexible grouping for reporting.\nCriteria pipelines can be serialised to YAML for\nreproducibility and sharing. Parts of this package were\ndeveloped with the assistance of AI coding assistants (GitHub\nCopilot and Claude Code, using Claude models from Anthropic);\nsee the LLM use statement on the package website.",
  "License": "MIT + file LICENSE",
  "URL": "https://mattmoo.github.io/cohortflow/,\nhttps://github.com/mattmoo/cohortflow",
  "BugReports": "https://github.com/mattmoo/cohortflow/issues",
  "Encoding": "UTF-8",
  "Roxygen": "list(markdown = TRUE)",
  "VignetteBuilder": "knitr",
  "Config/testthat/edition": "3",
  "Config/Needs/website": "gtsummary, UpSetR",
  "Config/roxygen2/version": "8.1.1",
  "Repository": "https://mattmoo.r-universe.dev",
  "Date/Publication": "2026-11-24 01:19:18 UTC",
  "RemoteUrl": "https://github.com/mattmoo/cohortflow",
  "RemoteRef": "HEAD",
  "RemoteSha": "c7c1f686b9a87ae648144b636a99513d52d647ef",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-11-24 02:39:09 UTC",
    "User": "root"
  },
  "Author": "Matthew Moore [aut, cre] (ORCID:\n<https://orcid.org/0000-0003-0730-8027>),\nHealth Research Council of New Zealand [fnd]",
  "Maintainer": "Matthew Moore <matthew.moore@auckland.ac.nz>",
  "_user": "mattmoo",
  "_type": "src",
  "_file": "cohortflow_0.0.0.9017.tar.gz",
  "_fileid": "https://r2.ropensci.org/7c2d8c79bc47d50d9441450b4931b32f8687ece9d17b2e663b9de12868b25ed8",
  "_filesize": 763593,
  "_sha256": "7c2d8c79bc47d50d9441450b4931b32f8687ece9d17b2e663b9de12868b25ed8",
  "_expires": "2027-03-04T02:46:03.000Z",
  "_created": "2026-11-24T02:39:09.000Z",
  "_published": "2026-11-24T02:46:05.083Z",
  "_upstream": "https://github.com/mattmoo/cohortflow",
  "_status": "success",
  "_maintainer": {
    "name": "Matthew Moore",
    "email": "matthew.moore@auckland.ac.nz",
    "login": "mattmoo",
    "orcid": "0000-0003-0730-8027",
    "description": "",
    "uuid": 20387030
  },
  "_jobs": [
    {
      "job": 138176319379,
      "time": 195,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "14884287345"
    },
    {
      "job": 138176319317,
      "time": 370,
      "config": "linux-release-x86_64",
      "r": "4.6.2",
      "check": "OK",
      "artifact": "14884532266"
    },
    {
      "job": 138176319219,
      "time": 135,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "14884936431"
    },
    {
      "job": 138176319302,
      "time": 139,
      "config": "macos-release-arm64",
      "r": "4.6.2",
      "check": "OK",
      "artifact": "14884816609"
    },
    {
      "job": 138174880175,
      "time": 214,
      "config": "source",
      "r": "4.6.2",
      "check": "OK",
      "artifact": "14885270620"
    },
    {
      "job": 138176319277,
      "time": 111,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "14884123313"
    },
    {
      "job": 138176319477,
      "time": 120,
      "config": "windows-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "14885090819"
    },
    {
      "job": 138176319320,
      "time": 100,
      "config": "windows-oldrel-x86_64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "14885200929"
    },
    {
      "job": 138176319342,
      "time": 99,
      "config": "windows-release-x86_64",
      "r": "4.6.2",
      "check": "OK",
      "artifact": "14884366924"
    }
  ],
  "_buildurl": "https://github.com/r-universe/mattmoo/actions/runs/45313539277",
  "_commit": {
    "id": "c7c1f686b9a87ae648144b636a99513d52d647ef",
    "author": "Matthew Moore <matthew.moore@auckland.ac.nz>",
    "committer": "Matthew Moore <matthew.moore@auckland.ac.nz>",
    "message": "Merge branch 'docs/logo-inter'\n",
    "time": 1795483158
  },
  "_distro": "resolute",
  "_host": "GitHub-Actions",
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 4.1.0",
      "role": "Depends"
    },
    {
      "package": "dplyr",
      "role": "Imports"
    },
    {
      "package": "ggplot2",
      "role": "Imports"
    },
    {
      "package": "grDevices",
      "role": "Imports"
    },
    {
      "package": "grid",
      "role": "Imports"
    },
    {
      "package": "rlang",
      "role": "Imports"
    },
    {
      "package": "tibble",
      "role": "Imports"
    },
    {
      "package": "utils",
      "role": "Imports"
    },
    {
      "package": "yaml",
      "role": "Imports"
    },
    {
      "package": "data.table",
      "role": "Suggests"
    },
    {
      "package": "flextable",
      "role": "Suggests"
    },
    {
      "package": "gt",
      "role": "Suggests"
    },
    {
      "package": "huxtable",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "officer",
      "role": "Suggests"
    },
    {
      "package": "ragg",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "svglite",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    },
    {
      "package": "withr",
      "role": "Suggests"
    }
  ],
  "_owner": "mattmoo",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2026-14",
      "n": 4
    },
    {
      "week": "2026-22",
      "n": 14
    },
    {
      "week": "2026-29",
      "n": 5
    },
    {
      "week": "2026-31",
      "n": 5
    },
    {
      "week": "2026-32",
      "n": 1
    },
    {
      "week": "2026-33",
      "n": 2
    },
    {
      "week": "2026-46",
      "n": 11
    },
    {
      "week": "2026-47",
      "n": 12
    },
    {
      "week": "2026-48",
      "n": 5
    }
  ],
  "_tags": [],
  "_stars": 0,
  "_contributors": [
    {
      "user": "mattmoo",
      "count": 113,
      "uuid": 20387030
    }
  ],
  "_userbio": {
    "uuid": 20387030,
    "type": "user",
    "name": "Matthew moore",
    "followers": 1
  },
  "_downloads": {
    "count": 0,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/cohortflow"
  },
  "_devurl": "https://github.com/mattmoo/cohortflow",
  "_pkgdown": "https://mattmoo.github.io/cohortflow/",
  "_searchresults": 11,
  "_rbuild": "4.6.2",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/cohortflow.html",
    "extra/contents.json",
    "extra/manual.pdf",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "LICENSE"
  ],
  "_cranurl": false,
  "_authors": [
    {
      "name": "Matthew Moore",
      "email": "matthew.moore@auckland.ac.nz",
      "orcid": "0000-0003-0730-8027",
      "role": [
        "aut",
        "cre"
      ]
    },
    {
      "name": "Health Research Council of New Zealand",
      "role": [
        "fnd"
      ]
    }
  ],
  "_exports": [
    "apply_criteria",
    "as_attrition_table",
    "as_attrition_tibble",
    "as_characteristics_table",
    "as_characteristics_tibble",
    "as_consort_diagram",
    "as_narrative",
    "cf_criteria",
    "cf_criterion",
    "cf_expected",
    "cf_hierarchy",
    "check_criteria",
    "cohort",
    "continue_criteria",
    "criteria_status",
    "exclude",
    "excluded",
    "export_criteria",
    "group_exclude",
    "group_include",
    "import_criteria",
    "include",
    "mock_cluster_rct",
    "mock_cohortflow",
    "mock_crossover",
    "mock_parallel_rct",
    "mock_stepped_wedge",
    "randomise",
    "save_consort_diagram",
    "select_within",
    "stack_cohorts"
  ],
  "_help": [
    {
      "page": "apply_criteria",
      "title": "Apply a criteria pipeline to a data frame",
      "concept": [
        "pipeline"
      ],
      "topics": [
        "apply_criteria"
      ]
    },
    {
      "page": "as_attrition_table",
      "title": "Format an attrition table from a cohort flow object",
      "concept": [
        "reporting"
      ],
      "topics": [
        "as_attrition_table"
      ]
    },
    {
      "page": "as_attrition_tibble",
      "title": "Build an attrition tibble from a cohort flow object",
      "concept": [
        "reporting"
      ],
      "topics": [
        "as_attrition_tibble"
      ]
    },
    {
      "page": "as_characteristics_table",
      "title": "Render a step-wise characteristics table",
      "concept": [
        "reporting"
      ],
      "topics": [
        "as_characteristics_table"
      ]
    },
    {
      "page": "as_characteristics_tibble",
      "title": "Characteristics of the cohort at each step",
      "concept": [
        "reporting"
      ],
      "topics": [
        "as_characteristics_tibble"
      ]
    },
    {
      "page": "as_consort_diagram",
      "title": "Build a CONSORT flow diagram from a cohort flow object",
      "concept": [
        "reporting"
      ],
      "topics": [
        "as_consort_diagram"
      ]
    },
    {
      "page": "as_narrative",
      "title": "Describe a cohort flow in words, for a methods section",
      "concept": [
        "reporting"
      ],
      "topics": [
        "as_narrative",
        "print.cf_narrative"
      ]
    },
    {
      "page": "cf_criteria",
      "title": "Create an eligibility criteria pipeline",
      "concept": [
        "criteria builders"
      ],
      "topics": [
        "cf_criteria"
      ]
    },
    {
      "page": "cf_criterion",
      "title": "Create a single cohort criterion",
      "concept": [
        "criteria builders"
      ],
      "topics": [
        "cf_criterion"
      ]
    },
    {
      "page": "cf_expected",
      "title": "Declare the expected set of observational units",
      "concept": [
        "pipeline"
      ],
      "topics": [
        "cf_expected"
      ]
    },
    {
      "page": "cf_hierarchy",
      "title": "Declare the nesting hierarchy for a cohort",
      "concept": [
        "pipeline"
      ],
      "topics": [
        "cf_hierarchy"
      ]
    },
    {
      "page": "check_criteria",
      "title": "Check that criteria only refer to columns present in the data",
      "concept": [
        "criteria builders"
      ],
      "topics": [
        "check_criteria"
      ]
    },
    {
      "page": "cohort",
      "title": "Extract the surviving cohort from a flow object",
      "concept": [
        "flow accessors"
      ],
      "topics": [
        "cohort"
      ]
    },
    {
      "page": "continue_criteria",
      "title": "Continue a criteria pipeline on top of an existing flow",
      "concept": [
        "pipeline"
      ],
      "topics": [
        "continue_criteria"
      ]
    },
    {
      "page": "criteria_status",
      "title": "Per-criterion status of every row",
      "concept": [
        "flow accessors"
      ],
      "topics": [
        "criteria_status"
      ]
    },
    {
      "page": "exclude",
      "title": "Add an exclusion criterion to a criteria pipeline",
      "concept": [
        "criteria builders"
      ],
      "topics": [
        "exclude"
      ]
    },
    {
      "page": "excluded",
      "title": "Extract excluded rows from a flow object",
      "concept": [
        "flow accessors"
      ],
      "topics": [
        "excluded"
      ]
    },
    {
      "page": "export_criteria",
      "title": "Export a criteria pipeline to YAML",
      "concept": [
        "yaml"
      ],
      "topics": [
        "export_criteria"
      ]
    },
    {
      "page": "group_exclude",
      "title": "Add a group-level exclusion criterion",
      "concept": [
        "criteria builders"
      ],
      "topics": [
        "group_exclude"
      ]
    },
    {
      "page": "group_include",
      "title": "Add a group-level inclusion criterion",
      "concept": [
        "criteria builders"
      ],
      "topics": [
        "group_include"
      ]
    },
    {
      "page": "import_criteria",
      "title": "Import a criteria pipeline from YAML",
      "concept": [
        "yaml"
      ],
      "topics": [
        "import_criteria"
      ]
    },
    {
      "page": "include",
      "title": "Add an inclusion criterion to a criteria pipeline",
      "concept": [
        "criteria builders"
      ],
      "topics": [
        "include"
      ]
    },
    {
      "page": "mock_cluster_rct",
      "title": "Generate synthetic data for a cluster-randomised controlled trial",
      "concept": [
        "mock data"
      ],
      "topics": [
        "mock_cluster_rct"
      ]
    },
    {
      "page": "mock_cohortflow",
      "title": "Generate synthetic cohort data for testing and examples (deprecated)",
      "topics": [
        "mock_cohortflow"
      ]
    },
    {
      "page": "mock_crossover",
      "title": "Generate synthetic data for a crossover trial",
      "concept": [
        "mock data"
      ],
      "topics": [
        "mock_crossover"
      ]
    },
    {
      "page": "mock_parallel_rct",
      "title": "Generate synthetic data for a parallel-group randomised controlled trial",
      "concept": [
        "mock data"
      ],
      "topics": [
        "mock_parallel_rct"
      ]
    },
    {
      "page": "mock_stepped_wedge",
      "title": "Generate synthetic data for a stepped-wedge cluster-randomised trial",
      "concept": [
        "mock data"
      ],
      "topics": [
        "mock_stepped_wedge"
      ]
    },
    {
      "page": "plot.cf_flow",
      "title": "Plot method for 'cf_flow' objects",
      "topics": [
        "plot.cf_flow"
      ]
    },
    {
      "page": "print.consort_diagram",
      "title": "Print method for 'consort_diagram' objects",
      "topics": [
        "print.consort_diagram"
      ]
    },
    {
      "page": "randomise",
      "title": "Mark the randomisation/allocation point in a criteria pipeline",
      "concept": [
        "criteria builders"
      ],
      "topics": [
        "randomise"
      ]
    },
    {
      "page": "save_consort_diagram",
      "title": "Save a CONSORT diagram for manuscript submission",
      "concept": [
        "reporting"
      ],
      "topics": [
        "save_consort_diagram"
      ]
    },
    {
      "page": "select_within",
      "title": "Select rows within groups",
      "concept": [
        "criteria builders"
      ],
      "topics": [
        "select_within"
      ]
    },
    {
      "page": "stack_cohorts",
      "title": "Stack the cohort at each step into one data frame",
      "concept": [
        "flow accessors"
      ],
      "topics": [
        "stack_cohorts"
      ]
    }
  ],
  "_pkglogo": "https://github.com/mattmoo/cohortflow/raw/HEAD/man/figures/logo.svg",
  "_readme": "https://github.com/mattmoo/cohortflow/raw/HEAD/README.md",
  "_rundeps": [
    "cli",
    "cpp11",
    "dplyr",
    "farver",
    "generics",
    "ggplot2",
    "glue",
    "gtable",
    "isoband",
    "labeling",
    "lifecycle",
    "magrittr",
    "pillar",
    "pkgconfig",
    "R6",
    "RColorBrewer",
    "rlang",
    "S7",
    "scales",
    "tibble",
    "tidyselect",
    "utf8",
    "vctrs",
    "viridisLite",
    "withr",
    "yaml"
  ],
  "_vignettes": [
    {
      "source": "cohortflow.Rmd",
      "filename": "cohortflow.html",
      "title": "Get started with cohortflow",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Example data",
        "1. Define the criteria",
        "2. Apply them",
        "3. Get the cohort",
        "4. Attrition table",
        "5. CONSORT flow diagram",
        "6. Who was excluded?",
        "7. Writing it up",
        "8. Save the criteria",
        "Next steps"
      ],
      "created": "2026-11-20 02:32:29",
      "modified": "2026-11-23 23:52:40",
      "commits": 3
    },
    {
      "source": "hierarchical-designs.Rmd",
      "filename": "hierarchical-designs.html",
      "title": "Hierarchical and cluster designs",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Declaring the hierarchy",
        "Counts at every level",
        "How units are counted",
        "Composite levels: stepped-wedge trials",
        "Characteristics at the cluster level",
        "Limits",
        "See also"
      ],
      "created": "2026-11-20 02:32:29",
      "modified": "2026-11-20 05:04:01",
      "commits": 2
    },
    {
      "source": "writing-criteria.Rmd",
      "filename": "writing-criteria.html",
      "title": "Writing criteria",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Step types at a glance",
        "Writing conditions",
        "Formulas",
        "Functions",
        "Labels and categories",
        "Missing values",
        "Grouped data",
        "Whole groups: group_include() and group_exclude()",
        "Rows within groups: select_within()",
        "The randomisation point",
        "Catching mistakes early",
        "Building pipelines from pieces"
      ],
      "created": "2026-11-20 02:32:29",
      "modified": "2026-11-20 05:04:01",
      "commits": 2
    }
  ],
  "_score": 4.171726453653231,
  "_indexed": true,
  "_nocasepkg": "cohortflow",
  "_universes": [
    "mattmoo"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.0.0.9017",
      "date": "2026-11-24T02:41:53.000Z",
      "distro": "resolute",
      "commit": "c7c1f686b9a87ae648144b636a99513d52d647ef",
      "fileid": "https://r2.ropensci.org/5a9c537895db7d4308432c2e58b135e53dfa96f7588e2c61f7489334e5505223",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/mattmoo/actions/runs/45313539277"
    },
    {
      "r": "4.6.2",
      "os": "linux",
      "version": "0.0.0.9017",
      "date": "2026-11-24T02:44:35.000Z",
      "distro": "resolute",
      "commit": "c7c1f686b9a87ae648144b636a99513d52d647ef",
      "fileid": "https://r2.ropensci.org/e944e148130be4ec3d5dcfbdb305e7039897d75185a559a653902d1433c0e1d0",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/mattmoo/actions/runs/45313539277"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.0.0.9017",
      "date": "2026-11-24T02:41:02.000Z",
      "commit": "c7c1f686b9a87ae648144b636a99513d52d647ef",
      "fileid": "https://r2.ropensci.org/a525e05ac6435590e1c9639d7f183559b85835a924cfe99c165f17d00f385668",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/mattmoo/actions/runs/45313539277"
    },
    {
      "r": "4.6.2",
      "os": "mac",
      "version": "0.0.0.9017",
      "date": "2026-11-24T02:40:58.000Z",
      "commit": "c7c1f686b9a87ae648144b636a99513d52d647ef",
      "fileid": "https://r2.ropensci.org/e7efad34b6e2a24817b80b8c11d374d27688a5c4303590509012d79561f00647",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/mattmoo/actions/runs/45313539277"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.0.0.9017",
      "date": "2026-11-24T02:41:24.000Z",
      "commit": "c7c1f686b9a87ae648144b636a99513d52d647ef",
      "fileid": "https://r2.ropensci.org/8ccb0262d387b7d3016a0b7702122866b63e61752cf02778c8b422f4ddcba996",
      "status": "success",
      "buildurl": "https://github.com/r-universe/mattmoo/actions/runs/45313539277"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.0.0.9017",
      "date": "2026-11-24T02:40:30.000Z",
      "commit": "c7c1f686b9a87ae648144b636a99513d52d647ef",
      "fileid": "https://r2.ropensci.org/50b7cb7fff937ead8bf29b56df7261bf860b8d0776e999340725ba78114351cf",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/mattmoo/actions/runs/45313539277"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.0.0.9017",
      "date": "2026-11-24T02:40:23.000Z",
      "commit": "c7c1f686b9a87ae648144b636a99513d52d647ef",
      "fileid": "https://r2.ropensci.org/a6c27b6fa2e839305f70608320d9357ed3d48108bffe17918ef1e7cd01fa11d9",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/mattmoo/actions/runs/45313539277"
    },
    {
      "r": "4.6.2",
      "os": "win",
      "version": "0.0.0.9017",
      "date": "2026-11-24T02:40:18.000Z",
      "commit": "c7c1f686b9a87ae648144b636a99513d52d647ef",
      "fileid": "https://r2.ropensci.org/9d0b91360ddfdbd9a0ffaf806eed2428b6de60ac6554a8df3ee397a3b6ffb194",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/mattmoo/actions/runs/45313539277"
    }
  ]
}