search for: idvect

Displaying 1 result from an estimated 1 matches for "idvect".

Did you mean: idvec
2011 Nov 18
1
Delete Rows Dynamically Within a Loop
...i] if (any(out$pip == 1)) { pnt.inBuffID <- out$ID[which(out$pip == 1)] cond <- df$Sex[i] != df$Sex[pnt.inBuffID] if (any(cond)){ eucdist <- sqrt((df$X[i] - df$X[pnt.inBuffID][cond])^2 + (df$Y[i] - df$Y[pnt.inBuffID][cond])^2) IDvect <- pnt.inBuffID[cond] new_colonies_temp <- data.frame(ID1=df$ID[i], ID2=IDvect[which(eucdist==min(eucdist))], X=(df$X[i] + df$X[pnt.inBuffID][cond][which(eucdist==min(eucdist))]) / 2, Y=(df$Y[i] + df$Y[pnt.inBuffID][cond][which(eucdist==min(eucd...