Skip to contents

Merge value and their associated comment

Usage

paste_valuecomment(value, comment)

Arguments

value

a vector different values.

comment

a character vector of associated comment

Value

a character vector of length 1, where values and comments are paste, sorted and separated with " | "

Examples

paste_valuecomment(c("other", "disease A"), c("comment 1", NA))
#> [1] "disease A | other:comment 1"
paste_valuecomment(NA, NA)
#> [1] NA