-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Non-repeated and non-duplicated combinations from groups with varying sizes that contain overlaps #50
Comments
Hi @delt87, What you are looking for is system.time(all_combos_algos <- RcppAlgos::comboGrid(
set1, set1, set2, set2, set3, set3, set4, set4, set5,
repetition = FALSE
))
#> user system elapsed
#> 0.001 0.000 0.001
dim(all_combos_algos)
#> [1] 2400 9
head(all_combos_algos)
#> Var1 Var2 Var3 Var4 Var5 Var6 Var7 Var8 Var9
#> [1,] "Mike B" "Paul G" "Joe D" "Matt B" "Dennis D" "Mike A" "Francis B" "Luka E" "Bobby A"
#> [2,] "Mike B" "Paul G" "Joe D" "Matt B" "Dennis D" "Mike A" "Francis B" "Luka E" "Flori A"
#> [3,] "Mike B" "Paul G" "Joe D" "Matt B" "Dennis D" "Mike A" "Francis B" "Luka E" "Max Z"
#> [4,] "Mike B" "Paul G" "Joe D" "Matt B" "Dennis D" "Mike A" "Francis B" "Luka E" "Ross U"
#> [5,] "Mike B" "Paul G" "Joe D" "Matt B" "Dennis D" "Mike A" "Francis B" "Steven Z" "Bobby A"
#> [6,] "Mike B" "Paul G" "Joe D" "Matt B" "Dennis D" "Mike A" "Francis B" "Steven Z" "Flori A" I ran your example above without subsetting (i.e. I removed the line For more information check out Cartesian Product where Order does not Matter. Hope this helps! Regards, |
Thank you for the assist. That's exactly what I'm looking for. Though it appears that unfortunately Edit: |
You are spot on. I have spent many a night thinking about this problem. As you can imagine, the underlying algorithm is non-trivial. It doesn't generate them one by one, however that is the ultimate goal. Much of the current algorithm is inspired by answers to this question: Picking unordered combinations from pools with overlap. I won't close this for now and take this as a moment for inspiration. Thanks for the nudge |
Just wanted to give an update. I've been working on a sketch for this for some time and I'm confident we are getting close to having this in production. |
I'm sure whatever release you come up with will be amazing. Looking forward to it. Also, I did a quick look in your github page to see if you had a 'donate to developer' option set up anywhere but I couldn't find one. Feel free to point me in the right direction if you have something like that for the work you put into this package. |
Sorry for the late reply and thank you for the kind words. You are right, there is nothing set up for monetary contributions, but I really do appreciate the sentiment. ... back to work on this! |
Is it possible to achieve the results below using either
comboGeneral
orcomboGroups
? (I'm not sure which one is the right function based on the few attempts I've made so far). I would like the end result to have norepetitions
andduplications
from any of the sets. Usingexpand.grid
is too slow as I have to manually adjust forrepetitions
andduplications
and I would also like to take advantage of theFUN
argument in your library to do some other things to the result. Thank you for this great library!The text was updated successfully, but these errors were encountered: