[R] passing a file name to a script
Steve Sherman
ssherman at cemml.colostate.edu
Thu Oct 19 23:26:57 CEST 2006
All,
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.
Steve
More information about the R-help
mailing list