model_id_merge {hubUtils} | R Documentation |
Merge/Split model output tbl model_id
column
Description
Merge/Split model output tbl model_id
column
Usage
model_id_merge(tbl, sep = "-")
model_id_split(tbl, sep = "-")
Arguments
tbl |
a |
sep |
character string. Character used as separator when concatenating
|
Value
tbl
with either team_abbr
and model_abbr
merged into a single model_id
column or model_id
split into columns team_abbr
and model_abbr
.
a tibble with model_id
column split into separate
team_abbr
and model_abbr
columns
Functions
-
model_id_merge()
: mergeteam_abbr
andmodel_abbr
into a singlemodel_id
column. -
model_id_split()
: splitmodel_id
column into separateteam_abbr
andmodel_abbr
columns.
Examples
tbl_split <- model_id_split(hub_con_output)
tbl_split
# Merge model_id
tbl_merged <- model_id_merge(tbl_split)
tbl_merged
# Split / Merge using custom separator
tbl_sep <- hub_con_output
tbl_sep$model_id <- gsub("-", "_", tbl_sep$model_id)
tbl_sep <- model_id_split(tbl_sep, sep = "_")
tbl_sep
tbl_sep <- model_id_merge(tbl_sep, sep = "_")
tbl_sep