[R] Combinations

Rainer Schuermann
Fri, 15 Mar 2013 14:40:15 -0000

Is

?expand.grid

what you are looking for?

Rgds,
Rainer



On Friday 15 March 2013 09:22:15 Amir wrote:
> Hi every one,
>
> I have two sets T1={c1,c2,..,cn} and T2={k1,k2,...,kn}.
> How can I find the sets as follow:
>
> (c1,k1), (c1,k2) ...(c1,kn)  (c2,k1) (c2,k2) .... (c2,kn) ... (cn,kn)
>
> Thanks.
> Amir
>
>