Yes, you're totally right about the name of the objects :)

So, setting exclude=FALSE is necessary if one wishes to include the point
itself in the marktable function and there is no zero values, at least one
"1"
clc.tab<-marktable(clc.ppp, R=20, exclude=FALSE)

To get the minimal radius for which a neighbor is found, I simply used
nndist function
min(nndist(clc.ppp))

Finally, I decided to set a 2000 units radius and to include the radius
starting point
clc.tab<-marktable(clc.ppp, R=2000, exclude=FALSE)

I get good results

Thanks everybody for everything!

2011/5/17 Rolf Turner <r.turner@auckland.ac.nz>

> 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
>

	[[alternative HTML version deleted]]

