R/is_permutation.R
is_permutation.Rd
Check whether x is a permutation of the multi-set s.
x
s
is_permutation(x, s)
[vector] Input vector to be checked.
vector
[vector] Base set.
A scalar logical value.
is_permutation(shuffle(1:10), 1:10) #> [1] TRUEis_permutation(c(2, 1, 4), s = 1:4) #> [1] FALSE