Displaying 2 results from an estimated 2 matches for "filepattern".
2009 Sep 21
2
Error in make.names when trying to read.table in if statement
...#39;m trying to read data from a collection of CSV files for processing
and graphing. All of my files begin with "modrate" and end with
".csv". I think I have the regex working but I am stumped at trying to
get read.table to work within an if statement.
This works:
> filepattern="modrate*"
> files <- list.files(pattern=filepattern)
> data <- read.table(files[1], header=TRUE, sep=",")
But I cannot get this to work:
> for (i in seq(along=files)) {
+ data <- read.table(files[i], header=TRUE, sep=",")
+ }
Error in make.names...
2008 Oct 10
0
Antwort: FW: R loops
it did help to create the separate vectors. The problem is, I would like
to continue working with each vector on its own and make some further
analysis.
For that i need to allocate each vector in the filePatterns a unique name,
which I just can't do.
I'm not so great in R loops and the help over the net regards for loops in
R is quite rare.
I'm really thankful for every help.
Mit freundlichen Grüßen / Best Regards
Assa Yeroslaviz
"Richard Pugh" <rpugh@mango-solutions.co...