[R] matrix transpose and object name
Thomas Lumley
thomas at biostat.washington.edu
Tue Nov 7 17:59:38 CET 2000
On Tue, 7 Nov 2000 Pan_Yuming at aam.de wrote:
> hello, everybody,
>
> i have several unresolved issues:
> 1. how to do a matrix transpose? i cant find how to do it in the
> documentation.
t(matrix).
This may be a good time to point out the help.search() function.
help.search(transpose)
returns
Help files with name or title matching `transpose':
t(base) Matrix Transpose
> 2..suppose i have an object named as lm1 from linear regression, how could
> i refer to it by paste("lm",1,sep="") ?
You could refer to it by get(paste("lm",1,sep="")) but this sort of thing
is very rarely necessary.
If you have a whole bunch of lms to store then you can put them in a list,
and then refer to them as, say, lmlist[[1]], lmlist[[2]]
> 3. to save a matrix 100 x 30, how to have a text file with 100 lines and 30
> cols, instead of stacking them?
help(write.table)
-thomas
Thomas Lumley
Assistant Professor, Biostatistics
University of Washington, Seattle
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list