Skip to content

Commit 9fee496

Browse files
author
maechler
committed
gait example forgotten in r87729
git-svn-id: https://svn.r-project.org/R/trunk@87730 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 8d817b1 commit 9fee496

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/library/base/man/duplicated.Rd

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,14 @@ x <- c(9:20, 1:5, 3:7, 0:8)
133133
stopifnot(identical(xu, unique(x)),
134134
identical(xu2, unique(x, fromLast = TRUE)))
135135

136-
duplicated(iris)[140:143]
136+
which(duplicated(warpbreaks))
137137

138-
duplicated(iris3, MARGIN = c(1, 3))
139-
anyDuplicated(iris) ## 143
138+
## for 3d array, MARGIN = -1 <==> MARGIN = 2:3
139+
duplicated(gait, MARGIN = -1) # boy26 duplicates boy19, see help(gait).
140+
anyDuplicated(warpbreaks)
140141
\dontshow{% array & data.frame methods:
141-
stopifnot(identical(anyDuplicated(iris), 143L),
142-
identical(anyDuplicated(iris3, MARGIN = c(1, 3)), 143L))
142+
stopifnot(identical(anyDuplicated(warpbreaks), 8L),
143+
identical(anyDuplicated(gait, MARGIN = -1), 26L))
143144
}
144145
anyDuplicated(x)
145146
anyDuplicated(x, fromLast = TRUE)

0 commit comments

Comments
 (0)