Mpre {forestPSD} | R Documentation |
The renewal ability of populations was simulated and predicted using the moving average method.
Mpre(ax,n=c(2,4,6))
ax |
Population number of within different age class. |
n |
Number of periods to average over. Must be between 1 and nrow(x), inclusive. |
The renewal ability of populations was simulated and predicted using the moving average method.
Result returns the results of the simulated and predicted the population dynamic changes using the moving average method.
Zongzheng Chai, chaizz@126.com
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.
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