search for: discbuff

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

2011 Nov 18
1
Delete Rows Dynamically Within a Loop
...1 14 16 582749.8 2883062 0 15 17 582906.4 2883317 0 16 18 582598.9 2883390 0 17 19 582890.2 2883413 0 18 20 582752.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)) {...