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...
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
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.
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
4 matches
Mail list logo