How to pass function parameters with parameter names to an external program in R? <p>For example,</p> <pre><code>passpara = function(pa, pb, pc) { # pa is not passed do1(pa) # pb and pc are passed # passed == "--pb pb_value --pc pc_value" # getpass is something I am trying to figure out passed = getpass(pb, pc) system(paste("cmd", passed)) } </code></pre> <p>To be specific, calling <code>passpara</code> like this:</p> <pre><code>passpara(pa="dummy", pb="full-iso", pc="always") </code></pre> <p>should be equivalent to call this command in shell:</p> <pre><code>cmd --pb full-iso --pc always </code></pre> <p>What would the function <code>getpass</code> look like in this case?</p> <p>I also think the <code>system</code> function is inconvenient sometimes, since it receive a string and you have to delimit arguments manually, is there something similar to python's <code>subprocess.call()</code> in R? In python you can do <code>subprocess.call(["cmd", parameter1, parameter2, parameter3])</code>, and it will delimit the args automatically, this is very handy if the args are strings that contain white spaces.</p>