psi.tied: Identify tied observations

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/psistat.R

Description

Determines which elements of a vector are tied.

Usage

1

Arguments

x

a numeric vector

Details

Unlike duplicated, this function returns all tied elements.

Value

a logical vector with the value TRUE at the positions of the tied elements.

Author(s)

Georgi N. Boshnakov

See Also

duplicated

Examples

1
2
3
4
5
6
v1 <- sample(1:6,12,replace=TRUE)
psi.tied(v1)
duplicated(v1)
d1 <- data.frame(v=v1, tied=psi.tied(v1), dup=duplicated(v1))
d1$flag <- ifelse(d1$tied==d1$dup, "", "different")
d1    # show the difference between `psi.tied' and `duplicated'

GeoBosh/psistat documentation built on Nov. 19, 2020, 8:19 p.m.