Skip to content

whatis wrong with my testing for CSR using F/G function?

4 messages · zhijie zhang, Barry Rowlingson, Roger Bivand

#
zhijie zhang wrote:

            
I explained this to you yesterday, but your email address was 
different. So far I've seen you use three different email addresses! If 
you keep to one email then life will be much simpler!

  The polymap() function call here is wrong - it is used to draw a 
polygon. Just remove it and do:

  grid.pts <- gridpts(bbox(pts),10*np)

  this produces a grid of 10*np points in the bounding box of the points 
in pts. You can then use polymap() to see them:

  polymap(bbox(pts))
  pointmap(grid.pts,add=T)

Barry
#
Barry Rowlingson wrote:

            
Okay, there's another reason this doesn't work: splancs now requires 
the 'sp' package which defines a 'bbox' function that doesn't do the 
same thing as the one in splancs. I dimly recall Roger noting this 
sometime ago!

  There's now a 'bboxx' function (two 'x's at the end) in splancs that 
does what the old splancs 'bbox' function did.

  So if you do:

   grid.pts<-gridpts(bboxx(pts),10*np)
   pointmap(grid.pts,add=T)

it should work. I did test my earlier solution, just not with a current 
version of splancs.

Barry
#
On Tue, 20 Jun 2006, Barry Rowlingson wrote:

            
Thanks, Barry, I think that is right - without knowing which version of 
splancs the questioner is using. So again, when asking a question about 
problems with code, please include the output of sessionInfo(). I have a 
feeling that this is in part the same question that I replied to yesterday 
using sp and spatstat. 

Roger