实例 R 语言 获取矩阵的长度

x
 
thisarray <- c(1:24)
multiarray <- array(thisarray, dim = c(4, 3, 2))
length(multiarray)
                    

输出结果

[1] 4