# \donttest{
d <- "https://github.com/jimclarkatduke/mast/blob/master/outputAbies.rdata?raw=True"
repmis::source_data( d )
# all trees in a plot:
wi <- which( fecPred$plotSpec == 'BERK28 abiesGrandis' ) # tree-years in plot-species group
tmp <- mastVolatility( treeID = fecPred$treeID[wi], year = fecPred$year[wi],
fec = fecPred$fecEstMu[wi], minLength = 10 )
period <- 1/tmp$frequency
density <- tmp$density
plot( NA, xlim = range( period, na.rm = TRUE ), ylim = range( density, na.rm = TRUE ),
xlab = 'Period (yr)', ylab = 'Density', log = 'xy' )
for( i in 1:nrow(density) )lines( period[i,], density[i, ], col = 'grey' )
lines( tmp$statsDensity['Period', ], tmp$statsDensity['Mean', ], lwd = 2 )
# }
Run the code above in your browser using DataLab