Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

@tcarruth

Description

@tcarruth

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions