

Take a look at ?expand.grid

Michael

On Aug 4, 2012, at 5:03 PM, "alijk1989 [via R]" <ml-node+s789695n4639190h6@n4.nabble.com> wrote:

> 
> 
> Thanks again for the help looks like this will be useful for what I'm doing.
> Is there any way to use combn to return combinations of values with
> themselves:
> 
> e.g.
> 
>> combn(1:3,2)
> 
>     [,1] [,2] [,3] [,4] [,5] [,6]
> [1,]    1    1    1   2     2     3
> [2,]    1   2    3    2     3     3
> 
> 
> 
> _______________________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://r.789695.n4.nabble.com/sapply-and-matrix-command-tp4637769p4639190.html
> 
> To unsubscribe from sapply and matrix command, visit http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4637769&code=ci1oZWxwQHItcHJvamVjdC5vcmd8NDYzNzc2OXwtNzg0MjM1NTA4
>    [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help@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.

______________________________________________
R-help@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.




_______________________________________________
If you reply to this email, your message will be added to the discussion below:
http://r.789695.n4.nabble.com/sapply-and-matrix-command-tp4637769p4639193.html

To unsubscribe from sapply and matrix command, visit http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4637769&code=ci1oZWxwQHItcHJvamVjdC5vcmd8NDYzNzc2OXwtNzg0MjM1NTA4
	[[alternative HTML version deleted]]

