[R] combining vectors into list
Ivan Calandra
ivan.calandra at uni-hamburg.de
Wed Feb 2 11:07:26 CET 2011
Hi,
Try this:
mapply(FUN=c, Row, Col, SIMPLIFY=FALSE)
HTH,
Ivan
Le 2/2/2011 08:55, Lorenzo Cattarino a écrit :
> Hi R users
>
>
>
> I have these two vectors:
>
>
>
> Row<- sample(1:25, 10)
>
> Col<- sample(1:25, 10)
>
>
>
> Is there a way to combine them into a list, whose first component is a
> vector containing the first element of Row and the first element of Col,
> the second component is a vector containing the second element of Row
> and the second element of Col, and so on...
>
>
>
> Thanks you
>
> Lorenzo
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Ivan CALANDRA
PhD Student
University of Hamburg
Biozentrum Grindel und Zoologisches Museum
Abt. Säugetiere
Martin-Luther-King-Platz 3
D-20146 Hamburg, GERMANY
+49(0)40 42838 6231
ivan.calandra at uni-hamburg.de
**********
http://www.for771.uni-bonn.de
http://webapp5.rrz.uni-hamburg.de/mammals/eng/1525_8_1.php
More information about the R-help
mailing list