alf Of
> Stavros Macrakis
> Sent: Tuesday, March 17, 2009 10:46 PM
> To: Greg Snow
> Cc: onyourmark; r-help@r-project.org
> Subject: Re: [R] permutations in R
>
> On Tue, Mar 17, 2009 at 12:41 PM, Greg Snow
> wrote:
> > No, I meant the Combinations package, it is ap
Stavros Macrakis wrote:
> On Tue, Mar 17, 2009 at 5:24 AM, Gavin Simpson
> wrote:
>
>> On Mon, 2009-03-16 at 18:43 -0400, Stavros Macrakis wrote:
>>
>>> ... no way to find relevant functions, and no way of knowing which one to
>>> use if there is more than one.
>>>
>
>
>> That
On Tue, Mar 17, 2009 at 12:41 PM, Greg Snow wrote:
> No, I meant the Combinations package, it is apparently an Omegahat package
> (http://www.omegahat.org/Combinations/). It looks similar to the permn
> function as far as the usage goes, but the documentation includes additional
> information
On Tue, Mar 17, 2009 at 5:24 AM, Gavin Simpson wrote:
> On Mon, 2009-03-16 at 18:43 -0400, Stavros Macrakis wrote:
>> ... no way to find relevant functions, and no way of knowing which one to
>> use if there is more than one.
> That is what the Task Views are meant to address, for discrete subje
ject.org
> Subject: Re: [R] permutations in R
>
> Greg,
>
> Thanks for helping this user.
>
> I assume you mean the permn function in the combinat package? For a
> new user (including me), it is not obvious how to get from "the
> permutations function in the Combina
On Mon, 2009-03-16 at 18:43 -0400, Stavros Macrakis wrote:
> Greg,
>
> I'm not bringing this up because I am bloody-minded, but because I
> think it's a serious issue with the R libraries -- there is no obvious
^ packages
> way to find relevant func
On Mar 16, 2009, at 6:43 PM, Stavros Macrakis wrote:
Greg,
Thanks for helping this user.
I assume you mean the permn function in the combinat package? For a
new user (including me), it is not obvious how to get from "the
permutations function in the Combinations package" to that.
I see there
Greg,
Thanks for helping this user.
I assume you mean the permn function in the combinat package? For a
new user (including me), it is not obvious how to get from "the
permutations function in the Combinations package" to that.
I see there is also a function gtools::permutations. The gtools
pac
Look at the permutations function in the Combinations package. Using the "fun"
argument may accomplish what you want. If not, there are references on the
help page to other code that may work for you.
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Heal
Try this:
> # Taken from combinations(gtools)
> # library(gregmisc)
> # Function permutations
> fn_perm_list <-
+ function (n, r, v = 1:n)
+ {
+if (r == 1)
+ matrix(v, n, 1)
+else if (n == 1)
+ matrix(v, 1, r)
+else {
+ X <- NULL
+ for (i in 1:n) X <- rbind(X, c
10 matches
Mail list logo