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.

______________________________________________
R-help@r-project.org 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.

Reply via email to