run from Shell R function with parameter, that contains quotes -
suppose, have function:
my_function<-function(string) return(string)
when run r:
>my_function('string"with"quotes') [1] "string\"with\"quotes"
it works well. when try run function shell:
r -e "source('./my_function.r'); my_function('string"with"quotes')"
it fails error, because shell can't deal quotes.
is there solution problem?
p.s. need run function directly shell.
Comments
Post a Comment