Dear R-users,
I am exploring disease spread in trees. I have locations for diseased trees
in 2004 and 2005 and want to know whether the patterns are independent. I
would like to use both the 'gcross' and 'kcross' functions (in
spatstat).
I imported the data from two text files and created point objects using
as.ppp. I then created a marked planar point pattern using ppp. I am
fairly sure that everything worked, because when I ask for information about
the data file, I get
marked planar point pattern: 628 points
multitype, with levels = w2004 w2005
window: rectangle = [ 607200 , 634800 ] x [ 3438400 , 3460400 ]
(Note: the window values are so large because I am using UTM coordinates for
my x and y locations)
However, when I run gcross, I get the following error:
code: g.0405<-Gcross(oakwilt, i="w2004", j="w2005")
error: Error in hist.default(nnd, breaks = brks, plot = FALSE) :
some 'x' not counted; maybe 'breaks' do not span range
of 'x'
When running kcross, I get this:
k.0405<-Kcross(oakwilt, i="w2004", j="w2005")
Error in "[<-"(`*tmp*`, index, value = NULL) :
incompatible types (1000) in subassignment type fix
I suspect that these two errors are somehow related. Any suggestions for
what might be wrong?
Thanks!
Charlotte Reemts
Vegetation Ecologist
The Nature Conservancy--Fort Hood (TX) Project
[[alternative HTML version deleted]]