1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/color_branches.R
\name{all_unique}
\alias{all_unique}
\title{Check if all the elements in a vector are unique}
\source{
\url{https://www.mail-archive.com/r-help@r-project.org/msg77592.html}
OLD (no longer working): https://r.789695.n4.nabble.com/Is-there-a-function-to-test-if-all-the-elements-in-a-vector-are-unique-td931833.html
}
\usage{
all_unique(x, ...)
}
\arguments{
\item{x}{a vector}
\item{...}{ignored.}
}
\value{
logical (are all the elements in the vector unique)
}
\description{
Checks if all the elements in a vector are unique
}
\examples{
all_unique(c(1:5, 1, 1))
all_unique(c(1, 1, 2))
all_unique(c(1, 1, 2, 3, 3, 3, 3))
all_unique(c(1, 3, 2))
all_unique(c(1:10))
}
\seealso{
\link{unique}
}
|