#' Recruitment plots
#'
#' @export
#'
Rect <- function(stock,source.dir,target.dir = source.dir)
{
recall <- read.table(paste(source.dir,"/",stock,"Recruitment.out",sep=""),header=T,as.is=T)
rec <- recall[recall$Period <= PlotOptions$ModelEndPeriod,]
if ( PlotOptions$UsePeriod == TRUE )
{
rec$x<-rec$Period
xlab<-"Period"
} else {
rec$x<-PeriodToFishingYear(rec$Period)
xlab<-"Fishing year"
}
attach(rec)
Recr<-Recruitment/1000000;
PlotType(paste(target.dir, "/", stock, "Rect", sep = ""), width = 170, height = 200)
par(las=1,oma=c(1,1,1,1),mar=c(4,4,1,1),mgp=c(3,1,0), cex = 3)
#Plot Erate vs Period
plot(Recruitment/100000~Year,data=rec[rec$Season==1,],pch=16,type="o", lwd = PlotOptions$thin,xlab=xlab,ylab="Recruitment(million animals) ",xaxt="s",
xlim=range(Year))
if ( PlotOptions$Captions ) mtext(paste(source.dir," ",stock,": Recruitment plot"),side=1,line=0,outer=TRUE,cex=2)
dev.off()
detach(rec)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.