You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following warning is thrown when the code is run in parallel.
1: In `[<-.data.frame`(`*tmp*`, , tmp.columns.to.zscore, value = list( :
provided 114 variables to replace 25 variables
The issue is that in some unlucky cases there are only one column left while we are binning the columns to send to each CPU core. In those cases, selection of columns from a matrix object does not return a table but rather a numeric vector. This means that on the line 677 of the following chuck, we are sending a vector to our func.zscore function rather than a matrix.
The x[, tmp.bins[[i]]] in line 677 of the chunk above is equivalent of:
base::getElement(object=x, name=tmp.bins[[i]])
The solution is pretty obvious, using base::subset(), although I think it will add some overhead on the runtime of the code. But because it is run only once per each SIVS run, it is pretty okay. The fix will come in PR #8.
The text was updated successfully, but these errors were encountered:
The following warning is thrown when the code is run in parallel.
The issue is that in some unlucky cases there are only one column left while we are binning the columns to send to each CPU core. In those cases, selection of columns from a matrix object does not return a table but rather a numeric vector. This means that on the line 677 of the following chuck, we are sending a vector to our
func.zscore
function rather than a matrix.sivs/R/sivs.R
Lines 665 to 678 in 7e629e2
The
x[, tmp.bins[[i]]]
in line 677 of the chunk above is equivalent of:The solution is pretty obvious, using
base::subset()
, although I think it will add some overhead on the runtime of the code. But because it is run only once per each SIVS run, it is pretty okay. The fix will come in PR #8.The text was updated successfully, but these errors were encountered: