iterpc is an R package which offers a collection of iterators for generating permutations and combinations with either distinct or non-distinct items, with or without replacement of items.
Questions tagged [iterpc]
3 questions
2
votes
1 answer
Finding A List of All Combinations of 6 Numbers That Add up to 10
So I've seen similar versions of this question asked before (Getting all combinations which sum up to 100 using R) but I'm struggling to find a way to figure out what I need to run specifically. I'm trying to create a list in R of all the different…

lordseal92
- 23
- 6
1
vote
0 answers
sampling from all possible permutations of a vector in R
Until now, I have found that generating permutations using iterpc is the fastest approach. An example usage could be:
library(iterpc)
set.seed(143)
dat <- sample(LETTERS[1:4], 10, replace = TRUE)
np_multiset(table(dat), length(dat))
# [1] 18900
I…

Prradep
- 5,506
- 5
- 43
- 84
0
votes
0 answers
Work on bigger combinations using for loop
Backgroud:
I am trying to recursively select rows and check for conditions based on combinations. I am able to dump the combinations using iterpc function. However, when I repeat the for loop on bigger row datasets (of input file) >200, I get the…

Kannan Subramanian
- 230
- 1
- 10