spatial-ews/spatialwarnings

Documentation of patchsizes

skefi opened this issue · 2 comments

skefi commented

The explanation of nbmask is ambiguous:
"a "neighboring mask": a matrix with odd dimensions describing which neighbors are to be considered as neighbors around a cell (see examples)."
Why odd? The examples suggests 5. You count the target cell as well? (but it's not considered as a neighbor, right?) Typically neighborhoods are 4 or 8 neighbors.

skefi commented

In the examples, I would also add something like:
data(forestgap)
list_patches <- patchsizes(forestgap[[5]]) # contains the vector of patch sizes for each matrix of the data set
mean_patches <- unlist(lapply(list_patches, mean)) #example of how to extract the mean patch size

I improved a bit this part. I think it's OK now.