{
  "_id": "6a197e36acfb0bcc41df762c",
  "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-05-29 10:54:08 UTC",
    "User": "root"
  },
  "Author": "Hugh Parsonage [aut, cre],\nMichael Frasco [ctb],\nBen Hamner [ctb]",
  "MD5sum": "4029b4b1d5d0ceeb3751b886541efaa0",
  "_user": "hughparsonage",
  "_type": "src",
  "_file": "hutils_2.0.1.tar.gz",
  "_fileid": "aede9a837fc8eaa4b71551f90bc2038dcf37044c19f24a9228bbff5cfb477bd8",
  "_filesize": 388216,
  "_sha256": "aede9a837fc8eaa4b71551f90bc2038dcf37044c19f24a9228bbff5cfb477bd8",
  "_created": "2026-05-29T10:54:08.000Z",
  "_published": "2026-05-29T11:53:26.936Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 78486988973,
      "time": 152,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7289055669"
    },
    {
      "job": 78486988964,
      "time": 143,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7289053109"
    },
    {
      "job": 78486988940,
      "time": 104,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7290011967"
    },
    {
      "job": 78486988952,
      "time": 80,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7290013955"
    },
    {
      "job": 78486471998,
      "time": 218,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7289011754"
    },
    {
      "job": 78486988955,
      "time": 115,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7289044966"
    },
    {
      "job": 78486988960,
      "time": 109,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7289043173"
    },
    {
      "job": 78486988974,
      "time": 133,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7289049671"
    },
    {
      "job": 78486988963,
      "time": 107,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7289043342"
    }
  ],
  "_buildurl": "https://github.com/r-universe/hughparsonage/actions/runs/26633062218",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_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
  },
  "_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": "2025-22",
      "n": 1
    },
    {
      "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"
  },
  "_downloads": {
    "count": 2032,
    "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.0",
  "_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.538168203013258,
  "_indexed": true,
  "_nocasepkg": "hutils",
  "_universes": [
    "hughparsonage"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "2.0.1",
      "date": "2026-05-29T10:56:30.000Z",
      "distro": "noble",
      "commit": "e2b4c993518406597f7e652f197d2b6a87262c62",
      "fileid": "3ed1497623d9eef7bf15c0ebe778d0fc6cb170cb6cbc49a28e8fa4596cc1c832",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/hughparsonage/actions/runs/26633062218"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "2.0.1",
      "date": "2026-05-29T10:56:25.000Z",
      "distro": "noble",
      "commit": "e2b4c993518406597f7e652f197d2b6a87262c62",
      "fileid": "173a0560ee9f667209c183705ca7962f27fa1398976da887fb8df01cef375a93",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/hughparsonage/actions/runs/26633062218"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "2.0.1",
      "date": "2026-05-29T11:52:45.000Z",
      "commit": "e2b4c993518406597f7e652f197d2b6a87262c62",
      "fileid": "f2aa9753053929158478ee6ea47c5857166da5328a0de1325f1287dddf67ec4f",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/hughparsonage/actions/runs/26633062218"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "2.0.1",
      "date": "2026-05-29T11:52:56.000Z",
      "commit": "e2b4c993518406597f7e652f197d2b6a87262c62",
      "fileid": "3feb0d1dc0c774a4a2458f88cd9bf15dbc43f30cbe62f5febdcb39956261819b",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/hughparsonage/actions/runs/26633062218"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "2.0.1",
      "date": "2026-05-29T10:56:22.000Z",
      "commit": "e2b4c993518406597f7e652f197d2b6a87262c62",
      "fileid": "1b5e9209b42d5e5e8e1ed8d41b831621bee1be354a7ddc55c1682c9ec617dbcf",
      "status": "success",
      "buildurl": "https://github.com/r-universe/hughparsonage/actions/runs/26633062218"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "2.0.1",
      "date": "2026-05-29T10:55:38.000Z",
      "commit": "e2b4c993518406597f7e652f197d2b6a87262c62",
      "fileid": "705cc5bcf248e34f8d559cc8f19f7d44db51d69614f239d5aef6ec44e76a09ef",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/hughparsonage/actions/runs/26633062218"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "2.0.1",
      "date": "2026-05-29T10:55:58.000Z",
      "commit": "e2b4c993518406597f7e652f197d2b6a87262c62",
      "fileid": "23d766b2d07e0e784637c57eaaabcc7348e93b81d75b8273fd019cda169425d8",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/hughparsonage/actions/runs/26633062218"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "2.0.1",
      "date": "2026-05-29T10:55:41.000Z",
      "commit": "e2b4c993518406597f7e652f197d2b6a87262c62",
      "fileid": "5c0039dc0afa5b20e07ba871565ceacf07b67fbea4591edfdaff9916939968a3",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/hughparsonage/actions/runs/26633062218"
    }
  ]
}