[R] Simple question on replace a matrix row

anna lippelanna24 at hotmail.com
Fri Jan 29 23:46:10 CET 2010


What I did now is that I checked the class of both matrix before assigning
the first row of mat2:
class(mainMat) --> "matrix"
class(mainMat[1,]) --> "list"
class(mat2) --> "matrix"
mat2[1,]<-mainMat[1,]
class(mat2) --> "list"
 I think the problem comes from mainMat[1,] that should be of class "matrix"
but is of class "list"...

-----
Anna Lippel
-- 
View this message in context: http://n4.nabble.com/Simple-question-on-replace-a-matrix-row-tp1427857p1437234.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list