Learn R Programming

forestSAS (version 1.0.1)

storeydvd: Dividing the forest storeies

Description

Forest overstory can be divided the many stories by dividing the range of tree height.

Usage

storeydvd(height, minH = min(height), maxH = max(height),
      storeynum = 6, include.lowest = TRUE, right = TRUE)

Arguments

height

Data of tree height

minH

Minimum value of height

maxH

Maximum value of height

storeynum

Number of storey

include.lowest

Logical, indicating if an "[i]" equal to the lowest (or highest, for right=FALSE) "breaks" value should be included. See the function "cut".

right

Logical, indicating if the intervals should be closed on the right (and open on the left) or vice versa.See the function "cut".

Value

heightfreq is the frequency of tree height heightdata is the result after divided the storey

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
##Compute the storeies of nearest neighbour in the point pattern
finpines.nnstorey<-nnIndex(finpines.addstorey,smark="storey",N=4,
                           buf.xwid =2,buf.ywid=3)
##Compute the stoery differation
finpines.H<-fsasN4(finpines.nnstorey$nnstorey,match.fun=differ)
finpines.H
# }

Run the code above in your browser using DataLab