matrix function

Hi,
I am new to R. I try to create a matrix, but it does't work as it supposed to be.

P<-matrix(c(1:6),nrow=3)

p
[1] 1 2 3 4 5

Any clue why this happens?

Jean

R is case sensitive. You are assigning the matrix to P but you are printing out p. Try checking that P contains the matrix.

Thank you! Indeed my bad.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.