Re: [R] object combinations

From: jim holtman <jholtman_at_gmail.com>
Date: Sat 16 Dec 2006 - 23:13:05 GMT

help.search('combination') and you will find 'combn'

> combn(1:8,2)

     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18]

[1,]    1    1    1    1    1    1    1    2    2     2     2     2
2     3     3     3     3     3
[2,]    2    3    4    5    6    7    8    3    4     5     6     7
8     4     5     6     7     8
     [,19] [,20] [,21] [,22] [,23] [,24] [,25] [,26] [,27] [,28]
[1,]     4     4     4     4     5     5     5     6     6     7
[2,]     5     6     7     8     6     7     8     7     8     8



On 12/16/06, mirca heli <mir.k@gmx.at> wrote:
>
> hello list,
>
> i've got 8 objects and i want to calculate a list with all combinations of
> them. the output should contain the object names.
> for example: object1 & 2, 1 $ 3, ...
>
> best regards
> mirca
> --
> "Ein Herz für Kinder" - Ihre Spende hilft! Aktion:
> www.deutschlandsegelt.de
> Unser Dankeschön: Ihr Name auf dem Segel der 1. deutschen America's
> Cup-Yacht!
>
> ______________________________________________
> R-help@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.
>

-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem you are trying to solve?

	[[alternative HTML version deleted]]


______________________________________________ R-help@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 Sun Dec 17 12:30:21 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sun 17 Dec 2006 - 03:30:22 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.