Re: [R] combinations between two vectors

2014-12-18 Thread Chel Hee Lee
er Clinical Research Support Unit College of Medicine University of Saskatchewan On 12/18/2014 9:16 AM, David L Carlson wrote: Depending on what you want, you probably want to start with expand.grid(): # All combinations of test with test pairs1 <- expand.grid(test, test) nrow(pairs1) [1] 36

Re: [R] combinations between two vectors

2014-12-18 Thread Michael Dewey
On 18/12/2014 14:56, Alaios via R-help wrote: Hi all,I am looking for a function that would give me all the combinations between two vectors.Lets take as example the test<-seq(1,3,by=5000) Browse[2]> test [1] 1 5001 10001 15001 20001 25001 I want all the combinations between two time

Re: [R] combinations between two vectors

2014-12-18 Thread David L Carlson
logy Texas A&M University College Station, TX 77840-4352 -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Sarah Goslee Sent: Thursday, December 18, 2014 9:06 AM To: Alaios Cc: R-help@r-project.org Subject: Re: [R] combinations between two vectors I can

Re: [R] combinations between two vectors

2014-12-18 Thread Sarah Goslee
I can't quite tell what you want: your example output is either unclear to me or mangled by posting in HTML (please don't). Is expand.grid(test, test) what you want, or partway to what you want? Sarah On Thu, Dec 18, 2014 at 9:56 AM, Alaios via R-help wrote: > Hi all,I am looking for a functio

[R] combinations between two vectors

2014-12-18 Thread Alaios via R-help
Hi all,I am looking for a function that would give me all the combinations between two vectors.Lets take as example the  test<-seq(1,3,by=5000) Browse[2]> test [1] 1  5001 10001 15001 20001 25001 I want all the combinations between two times the test... I think this is  called permutatio