akes it produces all of the combinations?
>
>
>
> From: Erich Neuwirth
> To: Herm Walsh ; r-help
> Sent: Sat, March 6, 2010 9:12:13 AM
> Subject: Re: [R] Working with combinations
>
> currCombin <- c(1,2) #this is the first possible combination 2 out if 5.
>
produces all of the combinations?
From: Erich Neuwirth
Sent: Sat, March 6, 2010 9:12:13 AM
Subject: Re: [R] Working with combinations
currCombin <- c(1,2) #this is the first possible combination 2 out if 5. Since
the vector has length 2, we are doing 2
gt;
> From: Erich Neuwirth
> To: Herm Walsh
> Cc: David Winsemius ; r-help@r-project.org
> Sent: Wed, March 3, 2010 2:10:34 PM
> Subject: Re: [R] Working with combinations
>
> The following code takes a combination of type n over k represented by an
> increasing sequence
] Working with combinations
The following code takes a combination of type n over k represented by an
increasing sequence
as input an produces the lexicographically next combinations.
So you can single step through all possible combinations and apply your filter
criteria
before you produce the
The following code takes a combination of type n over k represented by an
increasing sequence
as input an produces the lexicographically next combinations.
So you can single step through all possible combinations and apply your filter
criteria
before you produce the next combination.
next.combi
On Mar 3, 2010, at 12:35 PM, Herm Walsh wrote:
Thanks David for the thoughts. The challenge I have with this
approach is that the criteria I have is defined by a series of
tests--which I do not think I could substitute in in place of the
logical indexing.
In the combinations code I was
Thanks David for the thoughts. The challenge I have with this approach is that
the criteria I have is defined by a series of tests--which I do not think I
could substitute in in place of the logical indexing.
In the combinations code I was hoping there is a step where, each new
combination is
On Mar 2, 2010, at 9:15 PM, Herm Walsh wrote:
I am working with the combinations function (available in the gtools
package). However, rather than store all of the possible
combinations I would like to check each combination to see if it
meets a certain criteria. If it does, I will then s
I think there are several packages that implement combinations and several
that allow you to specify a function to be called when each vector of
combinations
is generated. I can't recall the names of all such packages, but the
Combinations package on www.omegahat.org/Combinations is one.
D.
I am working with the combinations function (available in the gtools package).
However, rather than store all of the possible combinations I would like to
check each combination to see if it meets a certain criteria. If it does, I
will then store it.
I have looked at the combinations code but
10 matches
Mail list logo