"Flattening" a ndoe value means pasting together all values in the vector to one character value.

flattenNodeValue(singleValue)

flattenNodeValues(x)

Arguments

singleValue

The single node value

x

A list of node values

Value

A character value, or a vector of values.

Examples

metabefor::flattenNodeValue(1:8);
#> [1] "'1', '2', '3', '4', '5', '6', '7' & '8'"

metabefor::flattenNodeValues(
  list(
    1:8,
    letters[1:4],
    LETTERS[10:17]
  )
);
#> [1] "'1', '2', '3', '4', '5', '6', '7' & '8'"
#> [2] "'a', 'b', 'c' & 'd'"                    
#> [3] "'J', 'K', 'L', 'M', 'N', 'O', 'P' & 'Q'"