[R] passing a file name to a script

From: Steve Sherman <ssherman_at_cemml.colostate.edu>
Date: Thu 19 Oct 2006 - 21:26:57 GMT


I have a script in which I am connecting to an MS Access data table. The script concludes with the output of a text file that I use in another program. My questions are these:

  1. Is there a method by which I can interactively enter the MS Access table name at the time I run the script—can I pass the script a file name and/or path and file name (so that it doesn’t always have to be the same name)?
  2. Is there a way form me to interactively enter an output table name at the time I run the script?

Below are the means by which I am connecting and outputting data:

con <- odbcConnectAccess([path to MS Access data table])

write.table([output table file name], file = "adjustedout.csv", append = FALSE, sep = ",", col.names = NA, qmethod = "double")

I am not a programmer so “talk” slowly. Answers to either, or both, questions would be greatly appreciated. If it matters I am using the Window binary version of R.

Thanks in advance for any assistance.


R-help@stat.math.ethz.ch 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. Received on Fri Oct 20 07:36:32 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 19 Oct 2006 - 22:30:11 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.