Closed ahart1 closed 4 months ago
Are you supplying the waa through the basic_info argument of prepare_wham_input? If so, and you are not supplying an array (with dim(waa)[1] equal to 1), then this could be causing the error.
For example, the default waa array without an asap3 input is defined here https://github.com/timjmiller/wham/blob/6c30301d5b68c2bb0c0330cc4f112432c7950dfd/R/set_WAA.R#L20
On Wed, Nov 9, 2022 at 1:46 PM Amanda R. Hart @.***> wrote:
This line of code generates the below error when only 1 WAA matrix is included in the ASAP input file
Error: Error in apply(data$waa[, avg.yrs.ind, ], c(1, 3), mean) : 'MARGIN' does not match dim(X)
When only 1 WAA matrix is available the MARGIN = 3 dimension does not exist
— Reply to this email directly, view it on GitHub https://github.com/timjmiller/wham/issues/69, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIGN7CKQY5AS3CAGHNZMXDWHPWPHANCNFSM6AAAAAAR3XWUQ4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- Timothy J. Miller, PhD (he, him, his) Research Fishery Biologist NOAA, Northeast Fisheries Science Center Woods Hole, MA 508-495-2365
I'm going to close this issue as old. If it somehow still applies, please just reopen.
This line of code generates the below error when only 1 WAA matrix is included in the ASAP input file
Code: https://github.com/timjmiller/wham/blob/6c30301d5b68c2bb0c0330cc4f112432c7950dfd/R/prepare_projection.R#L181
Error: Error in apply(data$waa[, avg.yrs.ind, ], c(1, 3), mean) : 'MARGIN' does not match dim(X)
When only 1 WAA matrix is available the MARGIN = 3 dimension does not exist