[R] How use a matrix method?

Grześ
Sat, 18 Apr 2009 20:25:30 -0000

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.