-
Notifications
You must be signed in to change notification settings - Fork 10
Description
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