Hello all, 

 

I have a data frame in the form:

 

s<-expand.grid(x=seq(1,100,by=1),y=seq(1,100,by=1))

w<-data.frame(x=s$x,y=s$y,z1=rep(c(1,2,3,4),times=length(s$x/4)),z2=seq(1,le
ngth(s$x),by=1))

 

The w$x and w$y represent the location of points and z1 and z2 attributes
corresponding to these points. 

 

 

My question is how to divide this area in 4 sub-areas of equal points each
and produce the counts of z1= '1', '2' , '3' in each quarter as well as mean
values of z2 for each quarter. 

 

Best, 

Ioanna


	[[alternative HTML version deleted]]

