search for: bdry

Displaying 3 results from an estimated 3 matches for "bdry".

Did you mean: bdr
2010 May 06
1
extracting coordinates from SpatialPolygonsDataFrame using slot functions
In converting some older code: ## builds an OWIN to generate a set of points on a grid within the OWIN object: bdry <- read.shape( "../../data/boundary.shp" ) outline.verts <- bdry$Shapes[[2]]$verts[1:bdry$Shapes[[2]]$Pstart[2],] outline.order <- nrow( outline.verts ) : 2 bdry.poly <- vector( 2, mode="list" ) bdry.poly[[1]] <- list( x=outline.verts[outline.order,1],...
2011 Nov 18
1
Delete Rows Dynamically Within a Loop
...2953.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)){ eucdist <-...
2011 Jan 14
1
holding objects in dataframes
...dius=50)) > str(a) 'data.frame': 2 obs. of 3 variables: $ a : num 1 2 $ b : num 3 4 $ polygons:List of 2 ..$ :List of 5 .. ..$ type : chr "polygonal" .. ..$ xrange: num -50 50 .. ..$ yrange: num -50 50 .. ..$ bdry :List of 1 .. .. ..$ :List of 4 .. .. .. ..$ x : num 50 49.9 49.8 49.5 49 ... .. .. .. ..$ y : num 0 2.45 4.9 7.34 9.75 ... .. .. .. ..$ area: num 7851 .. .. .. ..$ hole: logi FALSE .. ..$ units :List of 3 .. .. ..$ singular : chr "unit"...