density /diversity of points
On 18/05/11 05:05, Mathieu Rajerison wrote:
I've tried your method to determine the richness of landscapes on my area of interest using european corine land cover. I converted my polygon layer into a SpatialGridDataFrame then into a SpatialPointsDataFrame, and finally into a ppp object using one column: the type of soil occupation (CLC3_LIB). But my problem is that marktable gives me zero values, although I should get at least a "1" value for one of my columns... Here is a sample code:
ppp[1:5]$marks
[1] Mer et oc?an [2] V?g?tation clairsem?e [3] Pelouses et p?turages naturels [4] V?g?tation scl?rophylle (y.c. maquis et garrigue) [5] V?g?tation scl?rophylle (y.c. maquis et garrigue)
marktable(ppp[1:10], R=50)
mark
point A?roports Chantiers Cours et voie d'eau
1 0 0 0
2 0 0 0
3 0 0 0
4 0 0 0
5 0 0 0
6 0 0 0
7 0 0 0
8 0 0 0
9 0 0 0
10 0 0 0
mark
point Equipements sportifs et de loisirs
1 0
2 0
3 0
4 0
5 0
6 0
7 0
8 0
9 0
10 0
I don't see where the problem is..
Any help would be greatly appreciated.
Why do you assert that you should get at least one "1"? If there are no
points of your pattern within 50 units of any given point, then the table
will indeed consist of nothing but zeros.
If you don't believe that this is the problem then please provide a minimal
***reproducible*** example that we can work with, as the posting guide
requests.
And ***PLEASE*** do not call your point pattern "ppp"; this is the name
of a function and class in the spatstat package. Using it as the name of
an object is very confusing and potentially a source of errors. See
fortune("dog").
cheers,
Rolf Turner