frahik / BMTME

Bayesian Multi-Trait Multi-Environment for genomic selection[R package] [Dev version]

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

length of 'dimnames' [2] not equal to array extent

genomics2020 opened this issue · comments

Hello,

Excited to try this new package on my multi-location, multi-year, and unbalanced data. However, I have run into the following error:

Error in matrix(nrow = nI, ncol = nI, 0L, dimnames = list(NULL, envNames)) : 
  length of 'dimnames' [2] not equal to array extent

My command:
fm.sm <- BMTME(Y = Ysm, X = Z.Esm, Z1 = Z.Gsm, Z2 = Z.EGsm, nIter = 10, burnIn = 2, thin = 1)

There is no issue up to this point. Obviously there is no error when I try the example commands in the manual.

Not sure where the error is coming from but my guess is that my unbalanced data is to blame. So my question is, how does BMTME handle missing trait values? If it is dropping genotypes with NA for trait value, then I can see the matrices being unequal.

Dimensions of all my input matrices are fine:

dim(Ysm)
1866    6
dim(Z.Esm)
1866   17
dim(Z.Gsm)
1866  396
dim(Z.EGsm)
1866 6732

Would appreciate your help & response. Thank you.