{
  "_id": "6a1f119eb401979e7341dad2",
  "Package": "groupdata2",
  "Title": "Creating Groups from Data",
  "Version": "2.0.5",
  "Authors@R": "person(\ngiven = \"Ludvig Renbo\",\nfamily = \"Olsen\",\nrole = c(\"aut\", \"cre\"),\nemail = \"r-pkgs@ludvigolsen.dk\",\ncomment = c(ORCID = \"0009-0006-6798-7454\"))",
  "Description": "Methods for dividing data into groups. Create balanced\npartitions and cross-validation folds. Perform time series\nwindowing and general grouping and splitting of data. Balance\nexisting groups with up- and downsampling or collapse them to\nfewer groups.",
  "License": "MIT + file LICENSE",
  "URL": "https://github.com/ludvigolsen/groupdata2",
  "BugReports": "https://github.com/ludvigolsen/groupdata2/issues",
  "Encoding": "UTF-8",
  "RoxygenNote": "7.3.2",
  "RdMacros": "lifecycle",
  "Roxygen": "list(markdown = TRUE)",
  "VignetteBuilder": "knitr",
  "Config/pak/sysreqs": "libicu-dev",
  "Repository": "https://ludvigolsen.r-universe.dev",
  "Date/Publication": "2024-12-18 16:34:35 UTC",
  "RemoteUrl": "https://github.com/ludvigolsen/groupdata2",
  "RemoteRef": "HEAD",
  "RemoteSha": "56cdc19b773b2f6a6a3357b324fcbec3a70e923a",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-05-17 07:55:56 UTC",
    "User": "root"
  },
  "Author": "Ludvig Renbo Olsen [aut, cre] (ORCID:\n<https://orcid.org/0009-0006-6798-7454>)",
  "Maintainer": "Ludvig Renbo Olsen <r-pkgs@ludvigolsen.dk>",
  "MD5sum": "d910209b99571135d1e513fe6cbc3539",
  "_user": "ludvigolsen",
  "_type": "src",
  "_file": "groupdata2_2.0.5.tar.gz",
  "_fileid": "1408d41647bdd3c51fe44727d5caaccc36ec207f9a9dd18b5bb20c931d4a4e05",
  "_filesize": 1428163,
  "_sha256": "1408d41647bdd3c51fe44727d5caaccc36ec207f9a9dd18b5bb20c931d4a4e05",
  "_created": "2026-05-17T07:55:56.000Z",
  "_published": "2026-06-02T17:23:42.958Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 79130989892,
      "time": 233,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7040630139"
    },
    {
      "job": 79130989945,
      "time": 207,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7040627701"
    },
    {
      "job": 79130990018,
      "time": 147,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7040621215"
    },
    {
      "job": 79130989839,
      "time": 153,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7040621916"
    },
    {
      "job": 79130988661,
      "time": 202,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7040604371"
    },
    {
      "job": 79130988863,
      "time": 127,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7364995691"
    },
    {
      "job": 79130989447,
      "time": 164,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7040623242"
    },
    {
      "job": 79130989836,
      "time": 174,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7040624307"
    },
    {
      "job": 79130989841,
      "time": 228,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7040629890"
    }
  ],
  "_buildurl": "https://github.com/r-universe/ludvigolsen/actions/runs/25985140710",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/ludvigolsen/groupdata2",
  "_commit": {
    "id": "56cdc19b773b2f6a6a3357b324fcbec3a70e923a",
    "author": "Ludvig <ludvig@clin.au.dk>",
    "committer": "Ludvig <ludvig@clin.au.dk>",
    "message": "cran comments\n",
    "time": 1734539675
  },
  "_maintainer": {
    "name": "Ludvig Renbo Olsen",
    "email": "r-pkgs@ludvigolsen.dk"
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 3.5",
      "role": "Depends"
    },
    {
      "package": "checkmate",
      "version": ">= 2.0.0",
      "role": "Imports"
    },
    {
      "package": "dplyr",
      "version": ">= 0.8.4",
      "role": "Imports"
    },
    {
      "package": "numbers",
      "version": ">= 0.7-5",
      "role": "Imports"
    },
    {
      "package": "lifecycle",
      "role": "Imports"
    },
    {
      "package": "plyr",
      "version": ">= 1.8.5",
      "role": "Imports"
    },
    {
      "package": "purrr",
      "role": "Imports"
    },
    {
      "package": "rearrr",
      "version": ">= 0.3.0",
      "role": "Imports"
    },
    {
      "package": "rlang",
      "version": ">= 0.4.4",
      "role": "Imports"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "tibble",
      "version": ">= 2.1.3",
      "role": "Imports"
    },
    {
      "package": "tidyr",
      "role": "Imports"
    },
    {
      "package": "utils",
      "role": "Imports"
    },
    {
      "package": "broom",
      "role": "Suggests"
    },
    {
      "package": "covr",
      "role": "Suggests"
    },
    {
      "package": "ggplot2",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "lmerTest",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "role": "Suggests"
    },
    {
      "package": "xpectr",
      "version": ">= 0.4.1",
      "role": "Suggests"
    }
  ],
  "_owner": "ludvigolsen",
  "_selfowned": true,
  "_usedby": 7,
  "_updates": [],
  "_tags": [],
  "_topics": [
    "balance",
    "cross-validation",
    "data",
    "data-frame",
    "fold",
    "group-factor",
    "groups",
    "participants",
    "partition",
    "split",
    "staircase"
  ],
  "_stars": 26,
  "_contributors": [
    {
      "user": "ludvigolsen",
      "count": 541,
      "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": 1835,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/groupdata2"
  },
  "_devurl": "https://github.com/ludvigolsen/groupdata2",
  "_searchresults": 471,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/groupdata2.html",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/ludvigolsen/groupdata2",
  "_realowner": "ludvigolsen",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.1.0",
      "date": "2017-01-28"
    },
    {
      "version": "1.0.0",
      "date": "2017-10-22"
    },
    {
      "version": "1.1.0",
      "date": "2019-06-24"
    },
    {
      "version": "1.1.1",
      "date": "2019-07-05"
    },
    {
      "version": "1.1.2",
      "date": "2019-08-05"
    },
    {
      "version": "1.2.0",
      "date": "2020-03-07"
    },
    {
      "version": "1.2.1",
      "date": "2020-06-06"
    },
    {
      "version": "1.3.0",
      "date": "2020-06-15"
    },
    {
      "version": "1.4.0",
      "date": "2021-02-20"
    },
    {
      "version": "1.4.1",
      "date": "2021-03-06"
    },
    {
      "version": "1.4.2",
      "date": "2021-06-19"
    },
    {
      "version": "1.5.0",
      "date": "2021-07-03"
    },
    {
      "version": "2.0.0",
      "date": "2021-10-24"
    },
    {
      "version": "2.0.1",
      "date": "2022-08-28"
    },
    {
      "version": "2.0.2",
      "date": "2022-11-24"
    },
    {
      "version": "2.0.3",
      "date": "2023-06-18"
    },
    {
      "version": "2.0.5",
      "date": "2024-12-18"
    }
  ],
  "_exports": [
    "%primes%",
    "%staircase%",
    "all_groups_identical",
    "balance",
    "collapse_groups",
    "collapse_groups_by_ids",
    "collapse_groups_by_levels",
    "collapse_groups_by_numeric",
    "collapse_groups_by_size",
    "differs_from_previous",
    "downsample",
    "find_missing_starts",
    "find_starts",
    "fold",
    "group",
    "group_factor",
    "partition",
    "ranked_balances",
    "splt",
    "summarize_balances",
    "summarize_group_cols",
    "upsample"
  ],
  "_help": [
    {
      "page": "groupdata2-package",
      "title": "groupdata2: A package for creating groups from data",
      "topics": [
        "groupdata2-package",
        "groupdata2"
      ]
    },
    {
      "page": "grapes-primes-grapes",
      "title": "Find remainder from 'primes' method",
      "concept": [
        "remainder tools",
        "staircase tools"
      ],
      "topics": [
        "%primes%",
        "primes"
      ]
    },
    {
      "page": "grapes-staircase-grapes",
      "title": "Find remainder from 'staircase' method",
      "concept": [
        "remainder tools",
        "staircase tools"
      ],
      "topics": [
        "%staircase%",
        "staircase"
      ]
    },
    {
      "page": "all_groups_identical",
      "title": "Test if two grouping factors contain the same groups",
      "concept": [
        "grouping functions"
      ],
      "topics": [
        "all_groups_identical"
      ]
    },
    {
      "page": "balance",
      "title": "Balance groups by up- and downsampling",
      "concept": [
        "sampling functions"
      ],
      "topics": [
        "balance"
      ]
    },
    {
      "page": "collapse_groups",
      "title": "Collapse groups with categorical, numerical, ID, and size balancing",
      "concept": [
        "grouping functions"
      ],
      "topics": [
        "collapse_groups"
      ]
    },
    {
      "page": "collapse_groups_by",
      "title": "Collapse groups balanced by a single attribute",
      "concept": [
        "grouping functions"
      ],
      "topics": [
        "collapse_groups_by",
        "collapse_groups_by_ids",
        "collapse_groups_by_levels",
        "collapse_groups_by_numeric",
        "collapse_groups_by_size"
      ]
    },
    {
      "page": "differs_from_previous",
      "title": "Find values in a vector that differ from the previous value",
      "concept": [
        "l_starts tools"
      ],
      "topics": [
        "differs_from_previous",
        "not_previous"
      ]
    },
    {
      "page": "downsample",
      "title": "Downsampling of rows in a data frame",
      "concept": [
        "sampling functions"
      ],
      "topics": [
        "downsample"
      ]
    },
    {
      "page": "find_missing_starts",
      "title": "Find start positions that cannot be found in '`data`'",
      "concept": [
        "l_starts tools"
      ],
      "topics": [
        "find_missing_starts"
      ]
    },
    {
      "page": "find_starts",
      "title": "Find start positions of groups in data",
      "concept": [
        "l_starts tools"
      ],
      "topics": [
        "find_starts"
      ]
    },
    {
      "page": "fold",
      "title": "Create balanced folds for cross-validation",
      "concept": [
        "grouping functions"
      ],
      "topics": [
        "create_balanced_groups",
        "fold"
      ]
    },
    {
      "page": "group",
      "title": "Create groups from your data",
      "concept": [
        "grouping functions",
        "l_starts tools",
        "staircase tools"
      ],
      "topics": [
        "binning",
        "group",
        "split",
        "window"
      ]
    },
    {
      "page": "group_factor",
      "title": "Create grouping factor for subsetting your data",
      "concept": [
        "grouping functions",
        "l_starts tools",
        "staircase tools"
      ],
      "topics": [
        "group_factor"
      ]
    },
    {
      "page": "partition",
      "title": "Create balanced partitions",
      "concept": [
        "grouping functions"
      ],
      "topics": [
        "partition"
      ]
    },
    {
      "page": "ranked_balances",
      "title": "Extract ranked standard deviations from summary",
      "concept": [
        "summarization functions"
      ],
      "topics": [
        "ranked_balances"
      ]
    },
    {
      "page": "splt",
      "title": "Split data by a range of methods",
      "concept": [
        "grouping functions"
      ],
      "topics": [
        "splt"
      ]
    },
    {
      "page": "summarize_balances",
      "title": "Summarize group balances",
      "concept": [
        "summarization functions"
      ],
      "topics": [
        "summarize_balances"
      ]
    },
    {
      "page": "summarize_group_cols",
      "title": "Summarize group columns",
      "concept": [
        "summarization functions"
      ],
      "topics": [
        "summarize_group_cols"
      ]
    },
    {
      "page": "upsample",
      "title": "Upsampling of rows in a data frame",
      "concept": [
        "sampling functions"
      ],
      "topics": [
        "upsample"
      ]
    }
  ],
  "_readme": "https://github.com/ludvigolsen/groupdata2/raw/HEAD/README.md",
  "_rundeps": [
    "backports",
    "checkmate",
    "cli",
    "cpp11",
    "dplyr",
    "generics",
    "glue",
    "lifecycle",
    "magrittr",
    "numbers",
    "pillar",
    "pkgconfig",
    "plyr",
    "purrr",
    "R6",
    "Rcpp",
    "rearrr",
    "rlang",
    "stringi",
    "stringr",
    "tibble",
    "tidyr",
    "tidyselect",
    "utf8",
    "vctrs",
    "withr"
  ],
  "_vignettes": [
    {
      "source": "automatic_groups_with_groupdata2.Rmd",
      "filename": "automatic_groups_with_groupdata2.html",
      "title": "Automatic groups with groupdata2",
      "author": "Ludvig Renbo Olsen",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "Attach packages",
        "Data",
        "Outro"
      ],
      "created": "2017-04-28 15:07:48",
      "modified": "2021-07-03 12:15:10",
      "commits": 8
    },
    {
      "source": "cross-validation_with_groupdata2.Rmd",
      "filename": "cross-validation_with_groupdata2.html",
      "title": "Cross-validation with groupdata2",
      "author": "Ludvig Renbo Olsen",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "groupdata2 functions in focus",
        "What is cross-validation?",
        "Why training and test sets?",
        "The data",
        "Creating train/test sets",
        "What is leakage?",
        "Creating folds for cross-validation",
        "Cross-validation",
        "Cross-validation function",
        "Linear regression models",
        "Outro"
      ],
      "created": "2017-04-28 15:07:48",
      "modified": "2022-11-19 16:56:15",
      "commits": 12
    },
    {
      "source": "description_of_groupdata2.Rmd",
      "filename": "description_of_groupdata2.html",
      "title": "Description of groupdata2",
      "author": "Ludvig Renbo Olsen",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Installing groupdata2",
        "CRAN version",
        "GitHub development version",
        "Attach packages",
        "General information",
        "group_factor()",
        "group()",
        "splt()",
        "fold()",
        "partition()",
        "collapse_groups()",
        "balance()",
        "Groups, windows or folds?",
        "Introduction vignettes",
        "Use of kable()",
        "Grouping Methods",
        "Method: 'greedy'",
        "Method: 'n_dist' (Default)",
        "Method: 'n_fill'",
        "Method: 'n_last'",
        "Method: 'n_rand'",
        "Method: 'l_sizes'",
        "Method: 'l_starts'",
        "Skipping",
        "Automatically find group starts",
        "find_starts()",
        "find_missing_starts()",
        "Method: 'every'",
        "Method: 'staircase'",
        "Find remainder - %staircase%",
        "Method: 'primes'",
        "Find remainder - %primes%",
        "Balancing ID Methods",
        "ID method: 'n_ids'",
        "ID method: 'n_rows_c'",
        "ID method: 'distributed'",
        "ID method: 'nested'",
        "Arguments",
        "Grouping arguments",
        "data",
        "n",
        "method",
        "starts_col",
        "force_equal",
        "allow_zero",
        "descending",
        "randomize",
        "col_name",
        "remove_missing_starts",
        "k",
        "p",
        "cat_col",
        "num_col",
        "id_col",
        "id_aggregation_fn",
        "extreme_pairing_levels",
        "num_fold_cols",
        "unique_fold_cols_only",
        "max_iters",
        "handle_existing_fold_cols",
        "parallel",
        "list_out",
        "Balancing arguments",
        "size",
        "id_method",
        "mark_new_rows",
        "new_rows_col_name",
        "Using Functions",
        "Extra arguments showcase",
        "Examples of method differences",
        "n_ methods",
        "Vector with 57 elements divided into 6 groups",
        "Vector with 117 elements divided into 11 groups",
        "Greedy",
        "Vector with 100 elements with sizes of 8, 15, 20",
        "Staircasing",
        "Vector with 1000 elements with step sizes of 2, 5, 11",
        "Primes",
        "Vector with 1000 elements with n (start at) as 2, 5, 11",
        "The End"
      ],
      "created": "2017-01-22 21:57:12",
      "modified": "2022-11-19 16:56:15",
      "commits": 22
    },
    {
      "source": "introduction_to_groupdata2.Rmd",
      "filename": "introduction_to_groupdata2.html",
      "title": "Introduction to groupdata2",
      "author": "Ludvig Renbo Olsen",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "Use cases",
        "Outro"
      ],
      "created": "2017-01-25 00:21:21",
      "modified": "2021-07-03 12:15:10",
      "commits": 13
    },
    {
      "source": "time_series_with_groupdata2.Rmd",
      "filename": "time_series_with_groupdata2.html",
      "title": "Time series with groupdata2",
      "author": "Ludvig Renbo Olsen",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Windowing time series",
        "Attach packages",
        "Load time series data",
        "Reduce number of datapoints",
        "Staircase groups",
        "Outro"
      ],
      "created": "2017-04-28 15:07:48",
      "modified": "2022-11-19 16:56:15",
      "commits": 11
    }
  ],
  "_score": 9.071789627093779,
  "_indexed": true,
  "_nocasepkg": "groupdata2",
  "_universes": [
    "ludvigolsen"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "2.0.5",
      "date": "2026-05-17T07:58:30.000Z",
      "distro": "noble",
      "commit": "56cdc19b773b2f6a6a3357b324fcbec3a70e923a",
      "fileid": "630bd00505f05936a1b41184439d3b3271293afb2c343a27428abe635978b350",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ludvigolsen/actions/runs/25985140710"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "2.0.5",
      "date": "2026-05-17T07:58:09.000Z",
      "distro": "noble",
      "commit": "56cdc19b773b2f6a6a3357b324fcbec3a70e923a",
      "fileid": "aa75dd869a83107986a36d933a9d4b9cb33325c2d84bd461364151edbe9f6c4f",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ludvigolsen/actions/runs/25985140710"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "2.0.5",
      "date": "2026-05-17T07:57:36.000Z",
      "commit": "56cdc19b773b2f6a6a3357b324fcbec3a70e923a",
      "fileid": "85c5683aab9d6d09444c9d1d6899aa95becba6c465cbb6c25cb988d9718ae582",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ludvigolsen/actions/runs/25985140710"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "2.0.5",
      "date": "2026-05-17T07:57:44.000Z",
      "commit": "56cdc19b773b2f6a6a3357b324fcbec3a70e923a",
      "fileid": "809d04c660d299d24ce60a5874289d5494a4f5e6982e354c567c5af6605df744",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ludvigolsen/actions/runs/25985140710"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "2.0.5",
      "date": "2026-05-17T07:57:12.000Z",
      "commit": "56cdc19b773b2f6a6a3357b324fcbec3a70e923a",
      "fileid": "3c8614374f2704590354e4d6aee1cbd2ddd3c766bbf42c1f662a9403334efba2",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ludvigolsen/actions/runs/25985140710"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "2.0.5",
      "date": "2026-05-17T07:57:21.000Z",
      "commit": "56cdc19b773b2f6a6a3357b324fcbec3a70e923a",
      "fileid": "33e3454a8b668d8a875986b22389de6edc9e44e5209dbc87fb8f8e0460204ab3",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ludvigolsen/actions/runs/25985140710"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "2.0.5",
      "date": "2026-05-17T07:58:09.000Z",
      "commit": "56cdc19b773b2f6a6a3357b324fcbec3a70e923a",
      "fileid": "972aab1d6725269bc064a0c1b539a2e5048adf95180b93ec4fcdb2f9fdb47b4c",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ludvigolsen/actions/runs/25985140710"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "2.0.5",
      "date": "2026-06-02T17:23:22.000Z",
      "commit": "56cdc19b773b2f6a6a3357b324fcbec3a70e923a",
      "fileid": "ba195472cc46dbb18d890dd747997051155edac60b1c2624caf6144ade51fd7e",
      "status": "success",
      "buildurl": "https://github.com/r-universe/ludvigolsen/actions/runs/25985140710"
    }
  ]
}