library(iterpc)
  1. permutations: without replacement: distinct items
I <- iterpc(5, 2, ordered = TRUE)
getall(I)
  1. ermutations: with replacement: distinct items
I <- iterpc(5, 2, replace = TRUE, ordered = TRUE)
getall(I)
  1. permutations: without replacement: non distinct items
x <- c("a", "a", "b", "c")
I <- iterpc(table(x), 2, ordered = TRUE)
# or I <- iterpc(c(2,1,1), 2, label=c("a", "b", "c"), ordered = TRUE)
getall(I)
  1. permutations: with replacement: non distinct items
x <- c("a", "a", "b", "c")
I <- iterpc(table(x), 2, replace = TRUE, ordered = TRUE)
# or I = iterpc(c(2,1,1), 2, label=c("a", "b", "c"), replace= T RUE, ordered = TRUE)
getall(I)


randy3k/iterpc documentation built on Jan. 9, 2020, 2:02 a.m.