model_id_merge {hubUtils} | R Documentation |
model_id
columnMerge/Split model output tbl model_id
column
model_id_merge(tbl, sep = "-")
model_id_split(tbl, sep = "-")
tbl |
a |
sep |
character string. Character used as separator when concatenating
|
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
model_id_merge()
: merge team_abbr
and model_abbr
into a single
model_id
column.
model_id_split()
: split model_id
column into separate team_abbr
and model_abbr
columns.
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