keyfuns: Convenience functions for merging and separating keys

keyfunsR Documentation

Convenience functions for merging and separating keys

Description

Convenience functions for merging and separating keys

Usage

mergekeys(tbl, idcols, synthid = "id", drop = TRUE, sepchar = intToUtf8(31))

splitkeys(tbl, idcols, synthid = "id", drop = TRUE, sepchar = intToUtf8(31))

Arguments

tbl

Input table

idcols

Names of the columns with the separated keys

synthid

Name of the column with the synthetic key

drop

If TRUE, remove the input column(s) from the output

sepchar

Character to use to separate elements in the synthetic key (default is ASCII Unit Separator (^_)

Functions

  • mergekeys(): Merge two or more columns into a synthetic key

  • splitkeys(): Separate synthetic key into two or more columns


rplzzz/AHRQcomorb documentation built on Aug. 10, 2024, 8:12 a.m.