Re: [R] rbind: number of columns of result is not a multiple of vector length (arg 1)

2009-02-17 Thread jim holtman
You could 'split' the dataframe and then write out each element: something like x <- split(data.info, data.info$station.id) for (i in names(x)) write.csv(x[[i]], file=paste(i, ".csv", sep="")) On Tue, Feb 17, 2009 at 10:11 PM, CJ Rubio wrote: > > it works perfectly thank you for your help...

Re: [R] rbind: number of columns of result is not a multiple of vector length (arg 1)

2009-02-17 Thread CJ Rubio
it works perfectly thank you for your help what if i want to seperate each stations data and save in a .csv file?? while i'm asking you these i'm also finding some ways to do so.. thank you again. jholtman wrote: > > try using: > > data.info <- rbind(data.info, cbind(station.id, y

Re: [R] rbind: number of columns of result is not a multiple of vector length (arg 1)

2009-02-17 Thread jim holtman
try using: data.info <- rbind(data.info, cbind(station.id, year, date, max.discharge)) On Tue, Feb 17, 2009 at 9:26 PM, CJ Rubio wrote: > > i have the following constructed and running very well,, thanks to Gabor > Grothendieck for his help. > >>data.info <- c("station.id", "year", "date", "max.

[R] rbind: number of columns of result is not a multiple of vector length (arg 1)

2009-02-17 Thread CJ Rubio
i have the following constructed and running very well,, thanks to Gabor Grothendieck for his help. >data.info <- c("station.id", "year", "date", "max.discharge") > > for(i in 1:num.files) { + station.id <- substring(data[i], 1,8) + DF <- read.table(data[i], sep=",", blank.lines.skip = TRUE) + z