r - parse comma separated document -


that contains comma separated data.

for instance:

arg1='1',arg2=c(1,2),arg3=3 

note priori don't know number of arguments

i list of arguments values elements of list

$arg1    1    $arg2   c(1,2)    $arg3   3 

i not think idea use eval , parse that, e.g.:

args <- readlines("args.txt", n=1) l <- eval(parse(text=paste("list(", args, ")"))) l #$arg1 #[1] "1"  #$arg2 #[1] 1 2  #$arg3 #[1] 3 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -