Tuesday, 19 April 2016

Matrices

Matrices:

Here matrices are two dimensions arrays. 

> matrixone = matrix(c(1,2,3,4,5,6,7,8), nrow=2, ncol = 4, byrow=TRUE)

here we assigning a matrix 
> print(matrixone)
     [,1] [,2] [,3] [,4]
[1,]    1    2    3    4
[2,]    5    6    7    8

No comments:

Post a Comment