Name

str2vec — string to vector of strings

CALLING SEQUENCE

[s]=str2vec(name,arg1,…,argn)

PARAMETERS

Input

• name = a string

• argi = a string indicating a separator

Output

• s = a (n x 1) vector of names

DESCRIPTION

Given a string 'xxx=[yy1 sep …sep yyn]', define the vector ['yy1';…;'yyn']

EXAMPLE


1) str2vec('a=b,c,d',',') 

2) grocer_coef=str2vec(grocer_coef)

 

Example 1 gives the string (3,1) vector: 

!b  !

!c  !

!d  !

In example 2, taken from nls, str2vec is used to transform into a vector the list of coefficient names given by the user.



               

AUTHOR

Eric Dubois 2004