powered by
get a numeric vector from string (e.g. '1,2,3')
get_vector_from_str(string, sep = ",", zero = TRUE)
numeric vector from the string
a string containing separated by a separator
a string representing the separator
a boolean defining whether the output vector must contain a zero
Get a numeric vector from string containing numbers separated by a separator (e.g. '1,2,3').
get_vector_from_str('1,2,3') get_vector_from_str('0.1') get_vector_from_str('1;2;3',sep=';')
Run the code above in your browser using DataLab