colMeans(x.data.frame[, 2:3]) foo.x bar.x 0.1916620 0.6666667. 若要計算列的總和與平均,則可使用 rowSums 與 rowMeans 函數,用法都是類似的。
確定! 回上一頁