search for: polypnt

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

Did you mean: polypnts
2011 Nov 18
1
Delete Rows Dynamically Within a Loop
...752.8 2883361 0 19 21 582953.1 2883230 1 20 for(i in 1:dim(df)[1]){ new_colonies <- data.frame(ID1=0,ID2=0,X=0,Y=0) discbuff <- disc(radius, centre=c(df$X[i], df$Y[i])) #define the points and polygon pnts = cbind(df$X[-i],df$Y[-i]) polypnts = cbind(x = discbuff$bdry[[1]]$x, y = discbuff$bdry[[1]]$y) out = pnt.in.poly(pnts,polypnts) out$ID <- df$ID[-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)){...