Closed diazrenata closed 4 years ago
Merging #142 into sim_edits will not change coverage. The diff coverage is
100%
.
@@ Coverage Diff @@
## sim_edits #142 +/- ##
==========================================
Coverage 97.71% 97.71%
==========================================
Files 11 11
Lines 1223 1223
==========================================
Hits 1195 1195
Misses 28 28
Impacted Files | Coverage Δ | |
---|---|---|
R/simulate.R | 100% <100%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update f4f1a84...b67292f. Read the comment docs.
A simpler fix to avoid this issue entirely would be to stop R dropping the empty dimension when X
is subset. For example:
X_Eta <- X[in1, , drop = FALSE] %*% Eta[in2,]`
If Eta
is also a matrix object then it to probably should be protected from dropping empty dimensions. I'm not sure if that is possible given other code, but to be defensive one would use
X_Eta <- X[in1, , drop = FALSE] %*% Eta[in2, , drop = FALSE]
If X only has one column, X[in1,] is a vector and the matrix multiplication fails. Adding the as.matrix seems to fix it.