[R] Using changing names in loop in R

Tuatara franziskabroell at gmail.com
Sat Nov 6 23:13:12 CET 2010

A more detailed example:

Say I would like to read in data files that are set-up identically and have
identical (but somewhat) different text names (see below):

data_1 <- read.csv("data1.txt")
data_2 <- read.csv("data2.txt")
data_3 <- read.csv("data3.txt")

How do I automate this process?

(I assume the way I make R understand that the data file extension is to be
read as a number rather than a string is the same for things like applying
functions to matrices with different extensions, e.g. data_i, i = 1,2,3)
View this message in context: http://r.789695.n4.nabble.com/Using-changing-names-in-loop-in-R-tp3030132p3030412.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list