is.permutation | R Documentation |
This function tests if the given argument is a permutation of the first n natural integers (excluding 0)
is.permutation(perm)
perm |
a vector (or a bidimensional matrix) |
TRUE iff perm is a valid permutation (or a matrix of valid permutations)
is.permutation(c(3,1,2,4))
is.permutation(c(6,1,2,3))
is.permutation(matrix(c(1,2,3, 4,1,4,3,2,1,2,4,3), nrow = 3, ncol = 4, byrow = TRUE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.