R/isPermutation.R

Defines functions isPermutation

isPermutation <- function(x){
  isTRUE(is.numeric(x) && length(unique(x)) == length(x) && all(sort(x) == 1:length(x)))
}

Try the distfreereg package in your browser

Any scripts or data that you put into this service are public.

distfreereg documentation built on April 4, 2025, 12:30 a.m.