RobinHankin / hyper2

https://robinhankin.github.io/hyper2/
5 stars 3 forks source link

nice use of partitions package #209

Open RobinHankin opened 1 year ago

RobinHankin commented 1 year ago

Now that issue #148 is resolved, look:

suppressMessages(library("hyper2"))
suppressMessages(library("partitions"))
a <- multiset(c(1,1,2,2,3))
a[] <- letters[a]
H <- Reduce("+",apply(a,2,ordervec2supp3))
maxp(H)
#>         a         b         c 
#> 0.3333333 0.3333333 0.3333333

Created on 2023-06-26 with reprex v2.0.2

This is a nice application and should appear somewhere in the docs.