[R] Getting all possible combinations
Duncan Murdoch
murdoch.duncan at gmail.com
Thu Aug 24 01:25:54 CEST 2017
On 23/08/2017 6:25 PM, Bert Gunter wrote:
> Doesn't sort by size of subgroup. I interpret the phrase I asterisked as:
You were fooled by Peter's tricky single negative.
Duncan Murdoch
>
> Your code does the following:
>
> First subsets of size 1 are given.
> Then all subsets of size 2.
> Then all subsets of size 3.
> etc.
>
> Your code does not do this (quite).
>
> If you meant something else, then please clarify.
>
> Cheers,
> Bert
>
>
> Bert Gunter
>
> "The trouble with having an open mind is that people keep coming along
> and sticking things into it."
> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>
>
> On Wed, Aug 23, 2017 at 3:14 PM, peter dalgaard <pdalgd at gmail.com> wrote:
>>
>>> On 23 Aug 2017, at 23:12 , Bert Gunter <bgunter.4567 at gmail.com> wrote:
>>>
>>>> This points to a different algorithm where you write 0:(2^n-1) as n-digit binary numbers and chose items corresponding to the 1s. That won't give the combinations **sorted by size of selected subgroup** though. Something like this:
>>>
>>> No it doesn't.
>>> -- Bert
>>
>> Doesn't what? Do what I say it won't??
>>
>> -pd
>>
>> --
>> Peter Dalgaard, Professor,
>> Center for Statistics, Copenhagen Business School
>> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
>> Phone: (+45)38153501
>> Office: A 4.23
>> Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>
More information about the R-help
mailing list