Displaying 1 result from an estimated 1 matches for "sel_day".
2010 Jun 01
2
storing output data from a loop that has varying row numbers
...w that I do try and solve some of my own
problems, albeit perhaps not in the best manner!)
_________
However, the data I'm working with now has a very varied number of rows
(0:2500) over a large data set and I can't work out how is best to do this.
So my loop would be:
for (i in 1:33){
SEL_DAY<-seal_dist[seal_dist[,10]==i,]
print(paste("DAY", i, "of 33"))
for (s in 1:11){
SEL_HR<-SEL_DAY[SEL_DAY[,5]==s,]
print(paste("HR", s, "of 11"))
indx <- subset(SEL_HR, SEL_HR$DIST == 0)
SEL_HR$TO_ID <- indx$ID[match(SEL_HR$TO, indx$TO)...