| To: | Sarah Henderson <sarah.henderson@ubc.ca>, s-news@lists.biostat.wustl.edu |
|---|---|
| Subject: | Re: Importing multiple .xls files? |
| From: | "Richard M. Heiberger" <rmh@temple.edu> |
| Date: | Sat, 16 Jul 2005 22:56:31 -0400 |
## I created simple Excel files test1.xls and test3.xls in the
## directory in which my working .Data sits.
## Then I imported them in a loop.
## file.exists() allows me to go through the number sequence and lets
## the S-Plus program figure out whether there is a corresponding file.
objects(p="test[12345]")
for (i in 1:5) {
name <- paste("test", i, sep="")
name.i <- paste(name, ".xls", sep="")
if (file.exists(name.i)) assign(name, importData(name.i))
}
objects(p="test[12345]")
Rich
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Importing multiple .xls files?, Spencer Graves |
|---|---|
| Next by Date: | Re: Importing multiple .xls files?, Sarah Henderson |
| Previous by Thread: | arima(0,1,1), MARK LEEDS |
| Next by Thread: | Re: Importing multiple .xls files?, Sarah Henderson |
| Indexes: | [Date] [Thread] [Top] [All Lists] |