Re: [R] impossible # of errors in a simple code

2016-09-04 Thread David Winsemius
> On Sep 3, 2016, at 8:05 PM, Tamar Michaeli wrote: > > Any help in resolving the following errors will be appreciated: > >> pollutantmean <- function(directory, pollutant, id=1:332) > + file_inc <- list.files("specdata", full.names=TRUE) >> dat <- data.frame() >> for(i

Re: [R] impossible # of errors in a simple code

2016-09-04 Thread Bob Rudis
pretty sure you just missed the `{` at the beginning of the `function` definition block. On Sun, Sep 4, 2016 at 7:38 AM, Michael Dewey wrote: > A useful rule is to fix the first error you understand and hope that the > others go away. > > On 04/09/2016 04:05, Tamar

Re: [R] impossible # of errors in a simple code

2016-09-04 Thread Michael Dewey
A useful rule is to fix the first error you understand and hope that the others go away. On 04/09/2016 04:05, Tamar Michaeli wrote: Any help in resolving the following errors will be appreciated: pollutantmean <- function(directory, pollutant, id=1:332) + file_inc <- list.files("specdata",

[R] impossible # of errors in a simple code

2016-09-04 Thread Tamar Michaeli
Any help in resolving the following errors will be appreciated: > pollutantmean <- function(directory, pollutant, id=1:332) + file_inc <- list.files("specdata", full.names=TRUE) > dat <- data.frame() > for(i in 1:10) { + dat <- rbind(dat, read.csv(file_inc[i])) + } Error in read.table(file =