Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An MP that returns the PPD after n projected years given a specified directory for the PPD #106

Open
tcarruth opened this issue Aug 21, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@tcarruth
Copy link
Contributor

E.g:

MP_PPD = function(x, Data, reps=1, nyrs, outfile= NA){

lastyr = match(Data@LHYear, Data@Year)
pyr = length(Data@Year) - lastyr

if(pyr > nyrs){

 if(is.na(outfile)) outfile= paste0(getwd(), "/PPD.rda")
 saveRDS(Data, outfile)
 print(paste0("PPD written to ", outfile))
 stop()

} # end of save PPD

FMSYref(x, Data, reps) # default advice

}

class(MP_PPD) = 'MP'

where the user can just adjust outfile and nyrs as they like

formals(MP_PPD)$nyrs = 10
formals(MP_PPD)$outfile = "C:/temp/MSEstuff/myPPD.rda"

@tcarruth tcarruth added the enhancement New feature or request label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant