Closed ericgermaining closed 5 years ago
When there is a single observation, param[aux,] becomes a dimensionless vector, which does not work with apply.
Added drop=F to solve the issue.
if (length(aux)) sorted = t(apply(param[aux, , drop=F], 1L, order))
When there is a single observation, param[aux,] becomes a dimensionless vector, which does not work with apply.