Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/42.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Matrix 计算每列的平均值,同时在R编程中保持列名和行索引为1?_Matrix - Fatal编程技术网

Matrix 计算每列的平均值,同时在R编程中保持列名和行索引为1?

Matrix 计算每列的平均值,同时在R编程中保持列名和行索引为1?,matrix,Matrix,在R编程中,如何计算每列的平均值,同时保持列名相同,并使行索引为1 我使用了colMeans(nameForMyMatrix),但输出似乎不是矩阵

在R编程中,如何计算每列的平均值,同时保持列名相同,并使行索引为1

我使用了colMeans(nameForMyMatrix),但输出似乎不是矩阵