sums: sums

Description Usage Arguments Examples

Description

Used by GriegSmith function

Usage

1
sums(coords, dim, xmin = min(coords[, 1]), xmax = max(coords[, 1]), ymin = min(coords[, 2]), ymax = max(coords[, 2]))

Arguments

coords
dim
xmin
xmax
ymin
ymax

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## The function is currently defined as
function (coords,dim,xmin=min(coords[,1]),xmax=max(coords[,1]),ymin=min(coords[,2]),ymax=max(coords[,2])){


	xints<-((xmax-xmin)/dim);
	yints<-((ymax-ymin)/dim);

	xbins<-seq(from=xmin, to=xmax-xints, by=xints);
	ybins<-seq(from=ymin, to=ymax-yints, by=yints);



	bins<-cbind(c(sapply(xbins,rep,dim)), rep(ybins,dim));
	cnts<-matrix(apply(bins,1,belongtoint,vect=coords,int.x=xints,int.y=yints),nrow=dim,byrow=TRUE);


  }

GriegSmith documentation built on May 2, 2019, 12:07 p.m.

Related to sums in GriegSmith...