convert a "wide" map into a "long" one
melt_map(df, id, measure, sep_pattern = NA)
tibble. rows containing NA in any of following variables are removed.
string. name of a character variable in df
, its elements must be unique and can only contain one value each
string. name of a character variable in df
, its elements needn't to be unique and contain multiple values (we use stringr::str_split()
to sperate them by sep_pattern
)
string. see measure
, note that it is a pattern, for example, '|' should be '\|'
tibble. column names are id
and measure
.
Other mapping:
cast_map()