Dear R users, I am sorry to ask you such a pathetic newbie question, but how does one append data at the end of a data frame? I am working with GRASS/R library, but the question is about R. I have a data.frame containing the following variables basinID, distoutlet, drainage_area, slope
These variables are stored for all pixels of Grass Raster objects. For each drainage basin (basinID), I'd like to find the maximum of distoutlet. How can I store the pair of info (bv$ID, max(bv$distoutlet)) at each step of the for loop ? I presume something like this could do for (i 1:max(basinID)){ bid <- i length <- max(distoutlet[which(basinID == I(i))]) } But how do I handle the output and record bid and length in parallel in an object??? Any hint is welcome Thomas *** Le contenu de cet e-mail et de ses pièces jointes est destin...{{dropped}} ______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html