{
  "_id": "6a482244e06c18f0a652d969",
  "Package": "hutils",
  "Type": "Package",
  "Title": "Miscellaneous R Functions and Aliases",
  "Version": "2.0.1",
  "Date": "2026-01-18",
  "Authors@R": "c(person(\"Hugh\", \"Parsonage\", role = c(\"aut\", \"cre\"), email = \"hugh.parsonage@gmail.com\"),\nperson(\"Michael\", \"Frasco\", role = \"ctb\"),\nperson(\"Ben\", \"Hamner\", role = \"ctb\"))",
  "Maintainer": "Hugh Parsonage <hugh.parsonage@gmail.com>",
  "Description": "Provides utility functions for, and drawing on, the\n'data.table' package. The package also collates useful\nmiscellaneous functions extending base R not available\nelsewhere. The name is a portmanteau of 'utils' and the author.",
  "BugReports": "https://github.com/hughparsonage/hutils/issues",
  "URL": "https://github.com/hughparsonage/hutils,\nhttps://hughparsonage.github.io/hutils/",
  "License": "GPL-3",
  "RoxygenNote": "7.3.3",
  "Encoding": "UTF-8",
  "VignetteBuilder": "knitr",
  "Repository": "https://hughparsonage.r-universe.dev",
  "Date/Publication": "2026-03-30 05:25:58 UTC",
  "RemoteUrl": "https://github.com/hughparsonage/hutils",
  "RemoteRef": "HEAD",
  "RemoteSha": "e2b4c993518406597f7e652f197d2b6a87262c62",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-07-03 20:54:28 UTC",
    "User": "root"
  },
  "Author": "Hugh Parsonage [aut, cre],\nMichael Frasco [ctb],\nBen Hamner [ctb]",
  "_user": "hughparsonage",
  "_type": "src",
  "_file": "hutils_2.0.1.tar.gz",
  "_fileid": "https://r2.ropensci.org/c9b57a8ef133f07f12ad491af536764a7111215eb3c4684468e15746cafeaf16",
  "_filesize": 391620,
  "_sha256": "c9b57a8ef133f07f12ad491af536764a7111215eb3c4684468e15746cafeaf16",
  "_expires": "2026-10-11T20:57:39.000Z",
  "_created": "2026-07-03T20:54:28.000Z",
  "_published": "2026-07-03T20:57:40.819Z",
  "_jobs": [
    {
      "job": 85070103927,
      "time": 151,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "8074660406"
    },
    {
      "job": 85070103921,
      "time": 143,
      "config": "linux-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "8074659016"
    },
    {
      "job": 85070103923,
      "time": 107,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "8074652402"
    },
    {
      "job": 85070103893,
      "time": 84,
      "config": "macos-release-arm64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "8074647901"
    },
    {
      "job": 85069745807,
      "time": 215,
      "config": "source",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "8074631484"
    },
    {
      "job": 85070103903,
      "time": 154,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "8074661098"
    },
    {
      "job": 85070103900,
      "time": 95,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "8074650072"
    },
    {
      "job": 85070103902,
      "time": 107,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "8074652587"
    },
    {
      "job": 85070103913,
      "time": 95,
      "config": "windows-release",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "8074650308"
    }
  ],
  "_host": "GitHub-Actions",
  "_buildurl": "https://github.com/r-universe/hughparsonage/actions/runs/28682841349",
  "_status": "success",
  "_upstream": "https://github.com/hughparsonage/hutils",
  "_commit": {
    "id": "e2b4c993518406597f7e652f197d2b6a87262c62",
    "author": "HughParsonage <hugh.parsonage@gmail.com>",
    "committer": "HughParsonage <hugh.parsonage@gmail.com>",
    "message": "Handle factors in ein\n",
    "time": 1774848358
  },
  "_maintainer": {
    "name": "Hugh Parsonage",
    "email": "hugh.parsonage@gmail.com",
    "login": "hughparsonage",
    "description": "",
    "uuid": 8111628
  },
  "_distro": "resolute",
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 3.3.0",
      "role": "Depends"
    },
    {
      "package": "data.table",
      "role": "Imports"
    },
    {
      "package": "magrittr",
      "role": "Imports"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "utils",
      "role": "Imports"
    },
    {
      "package": "fastmatch",
      "role": "Imports"
    },
    {
      "package": "grDevices",
      "role": "Imports"
    },
    {
      "package": "testthat",
      "version": ">= 2.1.0",
      "role": "Suggests"
    },
    {
      "package": "datasets",
      "role": "Suggests"
    },
    {
      "package": "desc",
      "role": "Suggests"
    },
    {
      "package": "dplyr",
      "role": "Suggests"
    },
    {
      "package": "digest",
      "role": "Suggests"
    },
    {
      "package": "fst",
      "role": "Suggests"
    },
    {
      "package": "Hmisc",
      "role": "Suggests"
    },
    {
      "package": "hutilscpp",
      "role": "Suggests"
    },
    {
      "package": "microbenchmark",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "nycflights13",
      "role": "Suggests"
    },
    {
      "package": "geosphere",
      "role": "Suggests"
    },
    {
      "package": "ggplot2",
      "role": "Suggests"
    },
    {
      "package": "readr",
      "role": "Suggests"
    },
    {
      "package": "rcheology",
      "role": "Suggests"
    },
    {
      "package": "rstudioapi",
      "role": "Suggests"
    },
    {
      "package": "survey",
      "role": "Suggests"
    },
    {
      "package": "tibble",
      "role": "Suggests"
    },
    {
      "package": "tidyr",
      "role": "Suggests"
    },
    {
      "package": "withr",
      "version": ">= 2.0.0",
      "role": "Suggests"
    }
  ],
  "_owner": "hughparsonage",
  "_selfowned": true,
  "_usedby": 8,
  "_updates": [
    {
      "week": "2026-03",
      "n": 3
    },
    {
      "week": "2026-14",
      "n": 1
    }
  ],
  "_tags": [],
  "_stars": 10,
  "_contributors": [
    {
      "user": "hughparsonage",
      "count": 437,
      "uuid": 8111628
    },
    {
      "user": "danielleiwood",
      "count": 3,
      "uuid": 10891766
    },
    {
      "user": "davisvaughan",
      "count": 1,
      "uuid": 19150088
    }
  ],
  "_userbio": {
    "uuid": 8111628,
    "type": "user",
    "name": "HughParsonage",
    "followers": 80
  },
  "_downloads": {
    "count": 1339,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/hutils"
  },
  "_devurl": "https://github.com/hughparsonage/hutils",
  "_pkgdown": "https://hughparsonage.github.io/hutils/",
  "_searchresults": 236,
  "_rbuild": "4.6.1",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/hutils.html",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/hughparsonage/hutils",
  "_realowner": "hughparsonage",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.1.2",
      "date": "2017-07-09"
    },
    {
      "version": "0.8.0",
      "date": "2017-09-12"
    },
    {
      "version": "0.9.0",
      "date": "2017-10-22"
    },
    {
      "version": "0.10.0",
      "date": "2018-01-24"
    },
    {
      "version": "1.0.0",
      "date": "2018-03-05"
    },
    {
      "version": "1.1.0",
      "date": "2018-05-12"
    },
    {
      "version": "1.2.0",
      "date": "2018-08-20"
    },
    {
      "version": "1.3.0",
      "date": "2018-11-01"
    },
    {
      "version": "1.4.0",
      "date": "2019-03-09"
    },
    {
      "version": "1.5.0",
      "date": "2019-05-31"
    },
    {
      "version": "1.5.1",
      "date": "2019-10-05"
    },
    {
      "version": "1.6.0",
      "date": "2020-11-16"
    },
    {
      "version": "1.7.1",
      "date": "2021-07-22"
    },
    {
      "version": "1.8.1",
      "date": "2022-04-13"
    },
    {
      "version": "2.0.0",
      "date": "2026-01-18"
    }
  ],
  "_exports": [
    "%<->%",
    "%ein%",
    "%enotin%",
    "%epin%",
    "%implies%",
    "%notchin%",
    "%notin%",
    "%pin%",
    "ahull",
    "all_same_sign",
    "AND",
    "any_grepl",
    "auc",
    "average_bearing",
    "average_bearing_n",
    "bearing",
    "coalesce",
    "compass2bearing",
    "dev_copy2a4",
    "dir2",
    "drop_col",
    "drop_colr",
    "drop_cols",
    "drop_constant_cols",
    "drop_empty_cols",
    "drop_grep",
    "duplicated_rows",
    "easterly_component",
    "find_pattern_in",
    "fst_columns",
    "fst_nrow",
    "generate_LaTeX_manual",
    "goto_pattern_in",
    "has_unique_key",
    "haversine_distance",
    "if_else",
    "implies",
    "isAttached",
    "longest_prefix",
    "longest_suffix",
    "mean_na",
    "Mode",
    "mutate_ntile",
    "mutate_other",
    "neither",
    "NEITHER",
    "ngrep",
    "nor",
    "NOR",
    "northerly_component",
    "OR",
    "pow",
    "prohibit_unequal_length_vectors",
    "prohibit_vector_recycling",
    "prohibit_vector_recycling.MAXLENGTH",
    "provide.dir",
    "provide.file",
    "replace_pattern_in",
    "report_error",
    "RQ",
    "samp",
    "select_grep",
    "select_which",
    "selector",
    "seq_nrow",
    "set_cols_first",
    "set_cols_last",
    "set_colsuborder",
    "set_unique_key",
    "Switch",
    "trim_common_affixes",
    "weight2rows",
    "weighted_ntile",
    "weighted_quantile",
    "XOR"
  ],
  "_help": [
    {
      "page": "hutils-package",
      "title": "hutils package",
      "topics": [
        "hutils-package"
      ]
    },
    {
      "page": "ein",
      "title": "Exists and (not) in",
      "topics": [
        "%ein%",
        "%enotin%",
        "%epin%"
      ]
    },
    {
      "page": "grapes-notchin-grapes",
      "title": "Negation of in (character)",
      "topics": [
        "%notchin%"
      ]
    },
    {
      "page": "grapes-notin-grapes",
      "title": "Negation of in",
      "topics": [
        "%notin%"
      ]
    },
    {
      "page": "grapes-pin-grapes",
      "title": "Partial in",
      "topics": [
        "%pin%"
      ]
    },
    {
      "page": "ahull",
      "title": "Maximum area given x and y coordinates",
      "topics": [
        "ahull"
      ]
    },
    {
      "page": "aliases",
      "title": "Aliases",
      "topics": [
        "aliases",
        "AND",
        "NEITHER",
        "neither",
        "NOR",
        "nor",
        "OR",
        "pow",
        "XOR"
      ]
    },
    {
      "page": "all_same_sign",
      "title": "Determine whether a vector is all of the same sign",
      "topics": [
        "all_same_sign"
      ]
    },
    {
      "page": "any_grepl",
      "title": "Does the pattern appear anywhere?",
      "topics": [
        "any_grepl"
      ]
    },
    {
      "page": "auc",
      "title": "AUC",
      "topics": [
        "auc"
      ]
    },
    {
      "page": "average_bearing",
      "title": "Average of bearings",
      "topics": [
        "average_bearing",
        "average_bearing_n"
      ]
    },
    {
      "page": "bearing",
      "title": "Bearing calculations",
      "topics": [
        "bearing",
        "compass2bearing",
        "easterly_component",
        "northerly_component"
      ]
    },
    {
      "page": "coalesce",
      "title": "Find first non-missing element",
      "topics": [
        "coalesce"
      ]
    },
    {
      "page": "dev_copy2a4",
      "title": "Copy device to an A4 PDF",
      "topics": [
        "dev_copy2a4"
      ]
    },
    {
      "page": "dir2",
      "title": "List many files",
      "topics": [
        "dir2"
      ]
    },
    {
      "page": "drop_col",
      "title": "Drop column or columns",
      "topics": [
        "drop_col",
        "drop_cols"
      ]
    },
    {
      "page": "drop_colr",
      "title": "Drop columns whose names match a pattern",
      "topics": [
        "drop_colr",
        "drop_grep"
      ]
    },
    {
      "page": "drop_constant_cols",
      "title": "Drop constant columns",
      "topics": [
        "drop_constant_cols"
      ]
    },
    {
      "page": "drop_empty_cols",
      "title": "Drop empty columns",
      "topics": [
        "drop_empty_cols"
      ]
    },
    {
      "page": "duplicated_rows",
      "title": "Return duplicated rows of data.table",
      "topics": [
        "duplicated_rows"
      ]
    },
    {
      "page": "find_pattern_in",
      "title": "Find string pattern in (text) file",
      "topics": [
        "find_pattern_in",
        "goto_pattern_in"
      ]
    },
    {
      "page": "fst_columns",
      "title": "Utilities for `fst` files",
      "topics": [
        "fst_columns",
        "fst_nrow"
      ]
    },
    {
      "page": "generate_LaTeX_manual",
      "title": "Generate LaTeX manual of installed package",
      "topics": [
        "generate_LaTeX_manual"
      ]
    },
    {
      "page": "haversine_distance",
      "title": "Distance between two points on the Earth",
      "topics": [
        "haversine_distance"
      ]
    },
    {
      "page": "if_else",
      "title": "Vectorized if",
      "topics": [
        "if_else"
      ]
    },
    {
      "page": "implies",
      "title": "#' Logical implies",
      "topics": [
        "%implies%",
        "implies"
      ]
    },
    {
      "page": "isAttached",
      "title": "Is a package attached?",
      "topics": [
        "isAttached"
      ]
    },
    {
      "page": "isTrueFalse",
      "title": "Logical assertions",
      "topics": [
        "isTrueFalse"
      ]
    },
    {
      "page": "longest_affix",
      "title": "Longest common prefix/suffix",
      "topics": [
        "longest_affix",
        "longest_prefix",
        "longest_suffix",
        "trim_common_affixes"
      ]
    },
    {
      "page": "mean_na",
      "title": "Proportion of values that are NA.",
      "topics": [
        "mean_na"
      ]
    },
    {
      "page": "Mode",
      "title": "Statistical mode",
      "topics": [
        "Mode"
      ]
    },
    {
      "page": "mutate_ntile",
      "title": "Add a column of ntiles to a data table",
      "topics": [
        "mutate_ntile"
      ]
    },
    {
      "page": "mutate_other",
      "title": "Group infrequent entries into 'Other category'",
      "topics": [
        "mutate_other"
      ]
    },
    {
      "page": "ngrep",
      "title": "Anti-grep",
      "topics": [
        "ngrep"
      ]
    },
    {
      "page": "prohibit_unequal_length_vectors",
      "title": "Prohibit unequal length vectors",
      "topics": [
        "prohibit_unequal_length_vectors"
      ]
    },
    {
      "page": "prohibit_vector_recycling",
      "title": "Prohibit vector recycling",
      "topics": [
        "prohibit_vector_recycling",
        "prohibit_vector_recycling.MAXLENGTH"
      ]
    },
    {
      "page": "provide.dir",
      "title": "Provide directory",
      "topics": [
        "provide.dir"
      ]
    },
    {
      "page": "provide.file",
      "title": "Provide a file",
      "topics": [
        "provide.file"
      ]
    },
    {
      "page": "replace_pattern_in",
      "title": "Replace string pattern in text file",
      "topics": [
        "replace_pattern_in"
      ]
    },
    {
      "page": "report_error",
      "title": "Report errors and warnings",
      "topics": [
        "report_error"
      ]
    },
    {
      "page": "RQ",
      "title": "Shorthand for 'requireNamespace'",
      "topics": [
        "RQ"
      ]
    },
    {
      "page": "samp",
      "title": "Safer sampler",
      "topics": [
        "samp"
      ]
    },
    {
      "page": "select_grep",
      "title": "Select names matching a pattern",
      "topics": [
        "select_grep"
      ]
    },
    {
      "page": "select_which",
      "title": "Select columns satisfying a condition",
      "topics": [
        "select_which"
      ]
    },
    {
      "page": "selector",
      "title": "Fast selection of 'data.table' columns",
      "topics": [
        "selector"
      ]
    },
    {
      "page": "seq_nrow",
      "title": "Generate sequence of row numbers",
      "topics": [
        "seq_nrow"
      ]
    },
    {
      "page": "set_cols_first",
      "title": "Put columns first or last",
      "topics": [
        "set_colsuborder",
        "set_cols_first",
        "set_cols_last"
      ]
    },
    {
      "page": "swap",
      "title": "Swap assignment",
      "topics": [
        "%<->%",
        "swap"
      ]
    },
    {
      "page": "Switch",
      "title": "Vectorized switch",
      "topics": [
        "Switch"
      ]
    },
    {
      "page": "unique-keys",
      "title": "Unique keys",
      "topics": [
        "has_unique_key",
        "set_unique_key",
        "unique-keys"
      ]
    },
    {
      "page": "weight2rows",
      "title": "Expand a weighted data frame to an equivalent unweighted",
      "topics": [
        "weight2rows"
      ]
    },
    {
      "page": "weighted_ntile",
      "title": "Weighted (ranked) quantiles",
      "topics": [
        "weighted_ntile"
      ]
    },
    {
      "page": "weighted_quantile",
      "title": "Weighted quantile",
      "topics": [
        "weighted_quantile"
      ]
    }
  ],
  "_readme": "https://github.com/hughparsonage/hutils/raw/HEAD/README.md",
  "_rundeps": [
    "data.table",
    "fastmatch",
    "magrittr"
  ],
  "_vignettes": [
    {
      "source": "hutils.Rmd",
      "filename": "hutils.html",
      "title": "Hutils",
      "author": "Hugh Parsonage",
      "engine": "knitr::rmarkdown",
      "headings": [
        "hutils package",
        "Aliases",
        "coalesce and if_else",
        "Drop columns",
        "drop_constant_cols",
        "drop_empty_cols",
        "duplicated_rows",
        "Haversine distance",
        "mutate_other",
        "ngrep",
        "notin ein enotin pin",
        "%notin%",
        "%ein% and %enotin%",
        "%pin%",
        "provide.dir",
        "select_which",
        "set_cols_first",
        "Unique keys",
        "hutils v1.1.0",
        "auc",
        "select_grep",
        "hutils v1.2.0",
        "RQ",
        "ahull",
        "hutils v1.3.0",
        "weighted_quantile",
        "mutate_ntile",
        "longest_affix",
        "hutils 1.4.0",
        "%<->%",
        "average_bearing",
        "dir2",
        "Mode",
        "replace_pattern_in",
        "samp"
      ],
      "created": "2017-09-16 13:58:00",
      "modified": "2021-06-01 02:14:06",
      "commits": 15
    }
  ],
  "_score": 8.180933817357705,
  "_indexed": true,
  "_nocasepkg": "hutils",
  "_universes": [
    "hughparsonage"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "2.0.1",
      "date": "2026-07-03T20:56:52.000Z",
      "distro": "resolute",
      "commit": "e2b4c993518406597f7e652f197d2b6a87262c62",
      "fileid": "https://r2.ropensci.org/14c011da4dfe140f1959739baa5efbb7ef38d548fe359abec27d4988214a04c9",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/hughparsonage/actions/runs/28682841349"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "2.0.1",
      "date": "2026-07-03T20:56:42.000Z",
      "distro": "resolute",
      "commit": "e2b4c993518406597f7e652f197d2b6a87262c62",
      "fileid": "https://r2.ropensci.org/f1707e5a2ac78c3e9aab94a9aaba5aa8e36732f9235896677a41ee5f6ecb04ed",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/hughparsonage/actions/runs/28682841349"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "2.0.1",
      "date": "2026-07-03T20:56:09.000Z",
      "commit": "e2b4c993518406597f7e652f197d2b6a87262c62",
      "fileid": "https://r2.ropensci.org/4aa79840c128e4e56c158ed3b2db71ae47dcb938bca056485b834a0b6262229a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/hughparsonage/actions/runs/28682841349"
    },
    {
      "r": "4.6.1",
      "os": "mac",
      "version": "2.0.1",
      "date": "2026-07-03T20:55:53.000Z",
      "commit": "e2b4c993518406597f7e652f197d2b6a87262c62",
      "fileid": "https://r2.ropensci.org/bc1efbf38cfed75b07dbe840ee5707666172027e8f979d2d04f2824f51790bb2",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/hughparsonage/actions/runs/28682841349"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "2.0.1",
      "date": "2026-07-03T20:57:17.000Z",
      "commit": "e2b4c993518406597f7e652f197d2b6a87262c62",
      "fileid": "https://r2.ropensci.org/e943084884c15cde7abe1496f0c6767e1cc7ccfd21cc462cd9f69bb7848bffaf",
      "status": "success",
      "buildurl": "https://github.com/r-universe/hughparsonage/actions/runs/28682841349"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "2.0.1",
      "date": "2026-07-03T20:55:42.000Z",
      "commit": "e2b4c993518406597f7e652f197d2b6a87262c62",
      "fileid": "https://r2.ropensci.org/380e757f62fb3a42e2951d327b5316975ae6e0f338f0b53800e893475d6dcb26",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/hughparsonage/actions/runs/28682841349"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "2.0.1",
      "date": "2026-07-03T20:55:58.000Z",
      "commit": "e2b4c993518406597f7e652f197d2b6a87262c62",
      "fileid": "https://r2.ropensci.org/dd100c4c27d23b12801795c926f827e03ba517446e15eff7975a0a3c8ab6de7d",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/hughparsonage/actions/runs/28682841349"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "2.0.1",
      "date": "2026-07-03T20:55:46.000Z",
      "commit": "e2b4c993518406597f7e652f197d2b6a87262c62",
      "fileid": "https://r2.ropensci.org/048dc78007353622cc644c7a1e6bb45132d4be02877d0165b64e71904c9eb17f",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/hughparsonage/actions/runs/28682841349"
    }
  ]
}