Displaying 2 results from an estimated 2 matches for "seal_dist".
Did you mean:
seadist
2010 Jun 01
2
storing output data from a loop that has varying row numbers
...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)]}
}
where i...
2010 Jun 08
3
partial matches across rows not columns
Hi R users,
I am trying to omit rows of data based on partial matches an example of my
data (seal_dist) is below:
A quick break down of my coding and why I need to answer this - I am dealing
with a colony of seals where for example A1 is a female with pup and A1.1 is
that female's pup, the important part of the data here is DIST which tells
the distance between one seal (ID) and another (TO_ID)...