使用sub.big.matrix子集大矩阵

时间:2017-05-15 18:02:10

标签: r

我创建了一个名为Data_matrix

的大矩阵
is.sub.big.matrix(Data_matrix)
[1] TRUE

我尝试垂直对其进行子集化(每个子集有4列)

for (i in 1:(ncol(Data_matrix)))
{Sous_matrix <- sub.big.matrix(Data_matrix, firstCol = i, lastCol = (i+4), backingpath = NULL)
i<-i+4 }

但是打印了此错误消息

Error in sub.big.matrix(describe(x), firstRow, lastRow, firstCol, lastCol,  : 
  A sub.big.matrix object could not be created with the specified parameters

知道没有for循环,指令正常工作

Ss_matrix <- sub.big.matrix(Data_matrix, firstCol = 2, lastCol = 5, backingpath = NULL)

0 个答案:

没有答案