[R] How use a matrix method?

Grześ gregorio99 at gmail.com
Sat Apr 18 22:25:30 CEST 2009


Why when I want to find my value from matrix I get: 2,3,4,1,2? I think that I
should get: 1,2,3,4,7,8.

> macierz=matrix(1:4,7,8)
> macierz[[2]]
[1] 2
> macierz[[3]]
[1] 3
> macierz[[4]]
[1] 4
> macierz[[5]]
[1] 1
> macierz[[6]]
[1] 2


This is a similar situation:
> macierz=matrix(9,8,7,6)
> macierz[[1]]
[1] 9
> macierz[[2]]
[1] 9
> macierz[[3]]
[1] 9

Why not: 9,8,7
-- 
View this message in context: http://www.nabble.com/How-use-a-matrix-method--tp23116974p23116974.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list