privefl / bigstatsr

R package for statistical tools with big matrices stored on disk.
https://privefl.github.io/bigstatsr/
179 stars 30 forks source link

Perform `colSums(X^2)` on FBM object #166

Closed fmorgante closed 1 year ago

fmorgante commented 1 year ago

Hi Florian, I need to do colSums(X^2) where X is an FBM object. Do you have any suggestion on how to do that using bigstatsr functions? I don't seem to find an efficient way.

privefl commented 1 year ago

Hi, I can see 3 ways:

fmorgante commented 1 year ago

The third point is a great trick I did not think about. Thank you!