Re: [R] list

From: David Barron <mothsailor_at_googlemail.com>
Date: Wed, 06 Jun 2007 10:30:35 +0100

There's no special method, just create a list in the usual way. For example:

> l1<-list(a=letters[1:5],b=letters[6:10])
> l1

$a
[1] "a" "b" "c" "d" "e"

$b
[1] "f" "g" "h" "i" "j"

> l2<-list(c=LETTERS[1:5],d=LETTERS[6:10])
> l2

$c
[1] "A" "B" "C" "D" "E"

$d
[1] "F" "G" "H" "I" "J"

> l3<-list(l1,l2)
> l3

[[1]]
[[1]]$a
[1] "a" "b" "c" "d" "e"

[[1]]$b
[1] "f" "g" "h" "i" "j"

[[2]]
[[2]]$c
[1] "A" "B" "C" "D" "E"

[[2]]$d
[1] "F" "G" "H" "I" "J"

On 06/06/07, elyakhlifi mustapha <elyakhlifi_mustapha_at_yahoo.fr> wrote:
> hello,
> I wanna know how to create a list of list if it's possible and if it isn't possible how to do without.
> thanks.
>
>
> _____________________________________________________________________________
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_stat.math.ethz.ch 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.
>

-- 
=================================
David Barron
Said Business School
University of Oxford
Park End Street
Oxford OX1 1HP

______________________________________________
R-help_at_stat.math.ethz.ch 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.
Received on Wed 06 Jun 2007 - 09:35:55 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 06 Jun 2007 - 10:31:41 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.