Hello All: I am wondering how I can have "dat1" and "dat2" in the following loop where 'dat' and 'i' stick together to make dat1 and dat2 :
ifn <- "MyData" dat <- read.table(ifn) MyData: 01 0.40 02 0.40 03 0.40 04 0.35 05 0.34 06 0.33 names(dat)<-c("Code","M") for(i in 1:2) { dati <- dat[i:i+2,] } [[alternative HTML version deleted]] ______________________________________________ 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.