get_vector_from_str: get_vector_from_str

View source: R/model_next_step.R

get_vector_from_strR Documentation

get_vector_from_str

Description

get a numeric vector from string (e.g. '1,2,3')

Usage

get_vector_from_str(string, sep = ",", zero = TRUE)

Arguments

string

a string containing separated by a separator

sep

a string representing the separator

zero

a boolean defining whether the output vector must contain a zero

Details

Get a numeric vector from string containing numbers separated by a separator (e.g. '1,2,3').

Value

numeric vector from the string

Examples

get_vector_from_str('1,2,3')
get_vector_from_str('0.1')
get_vector_from_str('1;2;3',sep=';')

linea documentation built on Sept. 15, 2022, 9:06 a.m.