title: File is not creating in proper place In R script
body: <p>I have a R script. In which I am storing a path in a variable and call it in program 
  R script:- </p>
  
  <pre><code>args &lt;- "/media/folder"
  result &lt;- paste0(args,"/folder_a/result")
  df &lt;- read.table("/home/media/abc.txt", header = F)
  a0 &lt;-  df[df$Copy_No=="cn=0",]
  write.csv(a0,paste(result,"c0.csv",sep="/"))
  </code></pre>
  
  <p>It works when I use these in R terminal but when I am using these commands under R script the result is generating where the R script is present. Where I am wrong?</p>