[R] line up a matrix
Winfried Theis
theis at statistik.uni-dortmund.de
Fri Jan 4 15:16:30 CET 2002
Hi!
On 04-Jan-02 Tord Snall wrote:
> Dear all,
>
> I try to rearrange my ref. database (now in Excel!! :( ) for importing it
> into a reference manager program (RIS format).
>
> My file basically look like this [3,4]-matrix:
>
> rbind(c("a", "b", "c", "d"), c("e", "f", "g", "h"), c("i", "j", "k", "l"))
> [,1] [,2] [,3] [,4]
> [1,] "a" "b" "c" "d"
> [2,] "e" "f" "g" "h"
> [3,] "i" "j" "k" "l"
>
> and I have tried to find a function to line up the matrix into a vector
> which I would like to look like this:
>
> t(c("a", "b", "c", "d","e", "f", "g", "h","i", "j", "k", "l"))
>
> Is there any R function for available for that?
Well, try unlist(), when you imported it as data.frame that should do the
trick. At least my short test did so. ;-)
So long,
Winfried
>
> Thanks in advance!
>
>
> Sincerely,
> Tord Snäll
>
>
>
> -----------------------------------------------------------------------
> Tord Snäll
> Avd. f växtekologi, Evolutionsbiologiskt centrum, Uppsala universitet
> Dept. of Plant Ecology, Evolutionary Biology Centre, Uppsala University
> Villavägen 14
> SE-752 36 Uppsala, Sweden
> Tel: 018-471 28 82 (int +46 18 471 28 82) (work)
> Tel: 018-25 71 33 (int +46 18 25 71 33) (home)
> Fax: 018-55 34 19 (int +46 18 55 34 19) (work)
> E-mail: Tord.Snall at ebc.uu.se
> http://www.vaxtbio.uu.se/resfold/snall.htm
> ------------------------------------------------------------------------
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
> -
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
> _
----------------------------------
E-Mail: Winfried Theis <theis at statistik.uni-dortmund.de>
Date: 04-Jan-02
Time: 14:13:51
Dipl.-Math. Winfried Theis, Fachbereich Statistik, Graduiertenkolleg
"Angewandte Statistik"
Universität Dortmund, 44221 Dortmund
Tel.: +49-231-755-5903 FAX: +49-231-755-4387
----------------------------------
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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