Machine Learning with R Cookbook(Second Edition)
上QQ阅读APP看书,第一时间看更新

How to do it...

Perform the following steps to create and see a matrix in R:

> m = matrix(c(1,2,3,4,5,6), nrow=3) 
> m 
Output: 
[,1]       [,2]
[1,] 1 4
[2,] 2 5
[3,] 3 6