Skip to content

MSE tutorial - getCtrl function issue #14

Description

@piaschuchert

Hello,
I try to run the MSE tutorial and found a few small issues. However, one I cannot overcome is the issue with the getCtrl function. There is an error message with the last line in particular, where it says ctrl@trgtArray<-arr0. It seems there is no option in the fwdControl object to add a target array. I used the basic fwdControl function to create an object to get on with the tutorial, however, I believe I need to get something like this target array to proceed with the tutorial in full.

Thanks,

Pia

getCtrl <- function(values, quantity, years, it){
dnms <- list(iter=1:it, year=years, c("min", "val", "max"))
arr0 <- array(NA, dimnames=dnms, dim=unlist(lapply(dnms, length)))
arr0[,,"val"] <- unlist(values)
arr0 <- aperm(arr0, c(2,3,1))
ctrl <- fwdControl(data.frame(year=years, quantity=quantity, val=NA))
ctrl@trgtArray <- arr0
ctrl
}
M

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions