Mpre {forestPSD}R Documentation

Time sequence prediction for the population dynamic changes.

Description

The renewal ability of populations was simulated and predicted using the moving average method.

Usage

Mpre(ax,n=c(2,4,6))

Arguments

ax

Population number of within different age class.

n

Number of periods to average over. Must be between 1 and nrow(x), inclusive.

Details

The renewal ability of populations was simulated and predicted using the moving average method.

Value

Result returns the results of the simulated and predicted the population dynamic changes using the moving average method.

Author(s)

Zongzheng Chai, chaizz@126.com

References

Zhang Y, Wang J, Wang X, Wang L, Wang Y, Wei J, et al. 2024. Population structures and dynamics of Rhododendron communities with different stages of succession in northwest Guizhou, China. Plants-Basel 13.

Examples

data(Npop)
Mdata<-Mpre(ax=Npop$ax,n=c(2,3,5,6,8,10))
library(reshape2)
Mdata.melt<-reshape2::melt(Mdata,id=c("rank","ageclass"))
Mdata.melt$ageclass<-factor(Mdata.melt$ageclass,levels=unique(Mdata.melt$ageclass))
library(ggplot2)
Mpre.p<-ggplot()+geom_line(aes(x=ageclass,y=value,color=variable,group=variable),
                           linewidth=0.5,data=Mdata.melt)+
  xlab("Age class")+ylab("Number of individuals")+labs(color=" ")
Mpre.p

[Package forestPSD version 1.0.0 Index]