[R] Matrix scalar operation that saves memory?
bgunter@4567 @end|ng |rom gm@||@com
Wed Apr 12 06:34:14 CEST 2023
I doubt that R's basic matrix capabilities can handle this, but have a look
at the Matrix package, especially if your matrix is some special form.
On Tue, Apr 11, 2023, 19:21 Shunran Zhang <szhang using ngs.gen-info.osaka-u.ac.jp>
> Hi all,
> I am currently working with a quite large matrix that takes 300G of
> memory. My computer only has 512G of memory. I would need to do a few
> arithmetic on it with a scalar value. My current code looks like this:
> mat <- 100 - mat
> However such code quickly uses up all of the remaining memory and got
> the R script killed by OOM killer.
> Are there any more memory-efficient way of doing such operation?
> S. Zhang
> [[alternative HTML version deleted]]
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]
More information about the R-help