Tag: 矩阵

内存管理/不能分配大小为n的矢量Mb

我遇到了试图在R中使用大对象的问题。例如: > memory.limit(4000) > a = matrix(NA, 1500000, 60) > a = matrix(NA, 2500000, 60) > a = matrix(NA, 3500000, 60) Error: cannot allocate vector of size 801.1 Mb > a = matrix(NA, 2500000, 60) Error: cannot allocate vector of size 572.2 Mb # Can't go smaller anymore > rm(list=ls(all=TRUE)) > a = matrix(NA, 3500000, […]