[R] why these expressions cann't be nested?

ronggui ronggui.huang at gmail.com
Fri Mar 24 16:21:58 CET 2006


> x<-matrix(1:10,5)
> x=t(x)
> colnames(x) <- letters[1:5]
> x
     a b c d  e
[1,] 1 2 3 4  5
[2,] 6 7 8 9 10

If I try to nest the above expressions,II get the error. I know there
is something wrong with it(and I won't write command like that
now),but I don't why.So anyone can explain it for me? Thank you!

> x<-matrix(1:10,5)
> colnames(t(x)) <- letters[1:5]
Error: couldn't find function "t<-"

--
»ÆÈÙ¹ó
Deparment of Sociology
Fudan University




More information about the R-help mailing list