weizhou0 / qtl

GNU General Public License v3.0
21 stars 2 forks source link

Replace rbind with data.table::rbindlist in SPAGMMATtest #7

Closed mkanai closed 4 months ago

mkanai commented 4 months ago

Because for-looping rbind with large matrices is slow, I replaced rbind with data.table::rbindlist. I don't like we have to use data.table::as.data.table and as.matrix for rbindlist but they seem necessary.

Ideally, it would be great if we can replace cbind in the for-loop too with something like cbindlist -- but it's not currently implemented in data.table (PR is https://github.com/Rdatatable/data.table/issues/2576). We can implement something similar to this function.

More ideally, if we could implement this model handling part within Rcpp space, that would be the most efficient