The general format for creating a matrix of 'r' rows and 'c' columns from a vector 'vec' is,. amat <- matrix(vec, nrow=r, ncol=c, byrow=FALSE).
確定! 回上一頁