Re: [R] Error in make.names when trying to read.table in if statement

2009-09-25 Thread David Winsemius
On Sep 21, 2009, at 12:19 PM, Cynthia Sadler wrote: Hi, I'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 with

Re: [R] Error in make.names when trying to read.table in if statement

2009-09-25 Thread Juliet Hannah
Does this work for you? data_list <- list() filepattern="modrate*" all_files <- list.files(pattern=filepattern) data_list <- lapply(all_files, read.table,header=TRUE,sep=",") __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-h

[R] Error in make.names when trying to read.table in if statement

2009-09-21 Thread Cynthia Sadler
Hi, I'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="modra