Matrix Create Function R Example is Bad
Status: Planning
Brought to you by:
vidarg
In section 4 Matrices, one of the functions in R is not the same as the other function in R or the function in MATLIB.
R - BAD
> array(c(2,3,4,5), dim=c(2,2))
[,1] [,2]
[1,] 2 4
[2,] 3 5
R - CORRECTED
> array(c(2,4,3,5), dim=c(2,2))
[,1] [,2]
[1,] 2 3
[2,] 4 5
R - GOOD
> rbind(c(2,3),c(4,5))
[,1] [,2]
[1,] 2 3
[2,] 4 5
Octave - GOOD
octave:2> a=[2 3;4 5]
a =
2 3
4 5