[R] Partition of a set
Michael Bedward
michael.bedward at gmail.com
Fri Nov 12 10:32:49 CET 2010
Hi Diana,
Have a look at the setparts function in the partitions package.
Michael
On 12 November 2010 20:03, Diana <d.tichy at mathematik.uni-wuerzburg.de> wrote:
>
> Hi
>
> I am new on this forum. I am searching for a function in R which provides
> all partitions of a set, say for the set
> {1,2,3}
> you get
> {{1,2,3}}
> {1,{2,3}}
> {2,{1,3}}
> {3,{1,2}}
> {{1},{2},{3}}
> . The number of partitions of a set is given by Bellsche`s number. The
> number of possibilities of length (this is the number of subsets included in
> the partition) of the partition is given by the partition function.
> But I need a list containg all possible partitions of an index set
> {1,...,d}, d arbitrary.
>
> I have already looked at the FAQs but I did not found. Sorry.
>
> Can anybody help me?
>
> Thanks a lot!
> Diana Tichy
> --
> View this message in context: http://r.789695.n4.nabble.com/Partition-of-a-set-tp3039291p3039291.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at 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.
>
More information about the R-help
mailing list