Debian Codegraph @

man/all_unique.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/color_branches.R
3 \name{all_unique}
4 \alias{all_unique}
5 \title{Check if all the elements in a vector are unique}
6 \source{
7 \url{https://www.mail-archive.com/[email protected]/msg77592.html}
8 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
9 }
10 \usage{
11 all_unique(x, ...)
12 }
13 \arguments{
14 \item{x}{a vector}
15
16 \item{...}{ignored.}
17 }
18 \value{
19 logical (are all the elements in the vector unique)
20 }
21 \description{
22 Checks if all the elements in a vector are unique
23 }
24 \examples{
25
26 all_unique(c(1:5, 1, 1))
27 all_unique(c(1, 1, 2))
28 all_unique(c(1, 1, 2, 3, 3, 3, 3))
29 all_unique(c(1, 3, 2))
30 all_unique(c(1:10))
31 }
32 \seealso{
33 \link{unique}
34 }