wham icon indicating copy to clipboard operation
wham copied to clipboard

Project_wham doesn't work when only 1 WAA matrix in data due to indexing error

Open ahart1 opened this issue 1 year ago • 1 comments

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

ahart1 avatar Nov 09 '22 18:11 ahart1