I figured out how to use quotes and parentheses when using Rscript -e (on a bash shell): Rscript -e write\(1,\"a.txt\"\)
--> Question 1: why do the parentheses need to be escaped in the shell? (More a shell than an R question) Then I figured out how to use quotes and parentheses when calling Rscript through system: system('Rscript -e write\\(1,\\\'a.txt\\\'\\)') --> Question 2: why exactly is it necessary to use double and triple escapes? I kinda understand it, but not completely. Thanks for your insights! Adi -- View this message in context: http://r.789695.n4.nabble.com/quotes-in-Rscript-e-through-system-tp4631186.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.