Re: [R] ask a question about list in R project

From: David Winsemius <dwinsemius_at_comcast.net>
Date: Mon, 28 Jun 2010 23:04:23 -0400

There was a recent fortune suggestion along the lines of any simple English sentence can probably be satisfied with a simple set of R functions without loops. In this case you appear to be forgetting the "simple English sentence" part of that formulation.

-- 
David.

On Jun 28, 2010, at 7:37 PM, song song wrote:


> my list al is as below:
> mylist=list(c(2,3),5,7)
>> mylist
> [[1]]
> [1] 2 3
>
> [[2]]
> [1] 5
>
> [[3]]
> [1] 7
>
> How could I get the following FOUR lists:
>
> First one
> [[1]]
> [1] 3
>
> [[2]]
> [1] 5
>
> [[3]]
> [1] 7
>
> Second one
> [[1]]
> [1] 2
>
> [[2]]
> [1] 5
>
> [[3]]
> [1] 7
>
> Third One
> [[1]]
> [1] 2 3
>
> [[2]]
> [1] 7
>
> Last one
> [[1]]
> [1] 2 3
>
> [[2]]
> [1] 5
>
> Do I have to use 'for' loops? Please give me sone suggestions!
>
> Thank you all!!!!!
>
> [[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.
David Winsemius, MD West Hartford, CT ______________________________________________ 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.
Received on Tue 29 Jun 2010 - 03:06:28 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 Tue 29 Jun 2010 - 03:10:43 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.

list of date sections of archive