Description Usage Arguments Examples
Used by GriegSmith function
1 |
coords |
|
dim |
|
xmin |
|
xmax |
|
ymin |
|
ymax |
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);
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.