Learn R Programming

forestSAS (version 1.0.1)

addmark.ppp: Add marks for a point pattern

Description

Add marks for a point pattern

Usage

addmark.ppp(X, add.mark, add.name = "storey")

Arguments

X

A point pattern (object of class "ppp").

add.mark

Marks need added in the point pattern

add.name

Names of added marks (add.mark)

Value

A point pattern added marks

References

None

Examples

Run this code
# NOT RUN {
library(spatstat)
data(finpines)
finpinesdata<-as.data.frame(finpines)
####Dividing the stories
finpines.storey<-storeydvd(finpinesdata$height,storeynum=6)
finpines.storey

####Computing the storey differation
##Add the storey mark for finepines
finpines.addstorey<-addmark.ppp(finpines,
        add.mark=finpines.storey$heightdata[,2:3],
                  add.name=c("interval","storey" ))
finpines.addstorey
# }

Run the code above in your browser using DataLab