?read.csv

On Mon, Dec 28, 2009 at 5:31 PM, Nick Torenvliet
<nick.torenvliet@gmail.com>wrote:

> 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<http://www.r-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem that you are trying to solve?

	[[alternative HTML version deleted]]


