s-news
[Top] [All Lists]

Re: Number of combinations

To: Ernst Linder <elinder@cisunix.unh.edu>
Subject: Re: Number of combinations
From: jagadish rangrej <jrangrej@yahoo.com>
Date: Wed, 9 Jun 2004 13:18:29 -0700 (PDT)
Cc: s-news@lists.biostat.wustl.edu
In-reply-to: <40C7592B.8040802@cisunix.unh.edu>
Ernst,

seems its the easiest way currently. 

many Thanks,
Jag


--- Ernst Linder <elinder@cisunix.unh.edu> wrote:
> Hi:
> 
> If you load the "dox" library and use the commands
> "fac.design" (creates a full factorial design)
> and
> "fac2num"  (turns factor levels to numeric levels)
> then the best I can come up with is:
> 
> n <- 10; m <- 3
> ff <-
>
fac2num(as.data.frame(fac.design(levels=rep((n+1),m))))
> ff <- ff - 1
> ff[rowSums(ff) == n,]
> 
> 
> EL
> 
> 
> 
> 
> 
> jagadish rangrej wrote:
> > Dear all,
> > 
> > Is there any eligent way  (or routine) in splus or
> R
> > for obtaining the permutation: n-individuals &
> > m-floors; n idividuals are non-differentiable.
> Now, I
> > want to obtain the all possible combinations of
> counts
> > of persons on each floor
> > 
> > e.g. 10  balls goings in to 3 different erns; I
> need
> > some routine which can give me back an answer some
> > what in this form:
> > erns
> > 1  2  3
> > ~~~~~~~
> > 10 0 0
> > 9  1 0
> > 8  2 0
> > ....
> > 0 0 10
> > 
> > Many thanks in advance,
> > Jagadish Rangrej
> > 
> > 
> >     
> >             
> > __________________________________
> > Do you Yahoo!?
> > Friends.  Fun.  Try the all-new Yahoo! Messenger.
> > http://messenger.yahoo.com/ 
> >
>
--------------------------------------------------------------------
> > This message was distributed by
> s-news@lists.biostat.wustl.edu.  To
> > unsubscribe send e-mail to
> s-news-request@lists.biostat.wustl.edu with
> > the BODY of the message:  unsubscribe s-news
> > 
> 
> 
> -- 
>
****************************************************************
> Ernst Linder                       
> elinder@math.unh.edu
> Department of Mathematics and Statistics     603 -
> 862- 2687
> University of New Hampshire            Fax:  603 -
> 862 - 4096
> Durham, NH 03824               
> www.math.unh.edu/~elinder
>
****************************************************************
> 
>
--------------------------------------------------------------------
> This message was distributed by
> s-news@lists.biostat.wustl.edu.  To
> unsubscribe send e-mail to
> s-news-request@lists.biostat.wustl.edu with
> the BODY of the message:  unsubscribe s-news



        
                
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

<Prev in Thread] Current Thread [Next in Thread>