string_to_map {CHOIRBM} | R Documentation |
Converts a comma-separated string to a CHOIR BM
Description
Takes a string of IDs that are separated by a comma and converts the information into a data frame with a binary indication of whether or not an ID appeared. Useful for plotting an individual's CHOIR BM or for isolating particular sections to highlight.
Usage
string_to_map(map_str = "", delim = ",")
Arguments
map_str |
The delimited CBM string. |
delim |
The delimiter for the CBM string. |
Value
ret_df data.frame with all of the CHOIR BM segment IDs with a 1 if the segment was present and 0 otherwise.
Examples
cbm_str <- "101,102,103,104,201,202"
cbm_df <- string_to_map(cbm_str)
#plot in a male or female bodymap...
plot_male_choirbm(cbm_df, "value")
[Package CHOIRBM version 0.0.2 Index]