I have the following code fileList <-list.files(path = ".", pattern = "[^a-z].txt$", all.files = FALSE, full.names = FALSE, recursive = FALSE, ignore.case = FALSE) for (x in 1:length(fileList)){ fileLines <- data.frame(read.table(fileList[x])) print(string) }
the lines of the file all have the following format... AB,20091224,156,156,154,154,55,1198 Can I access the comma separated values directly via indexes on fileLines? e.g. I want to be able to do something like this... >date <- fileLines[1][2] >print(date) "20091224" I've been trying for a while and I haven't been able to hit the separate elements. Nick [[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.