Suppose, I am running system command in R to run an executable.
executable
inputfile <- \"/path/myfile.txt\"
How can I replace /path/myf
/path/myf
Try either of these:
library(gsubfn) fn$system("executable -input $inputfile -output output.txt")
or without packages:
cmd <- sprintf("executable -input %s -output output.txt", inputfile) system(cmd)