nonUniq: nonUniq: Find Replicated Elements In A Vector

Description Usage Arguments Value Author(s)

View source: R/nonUniq.R

Description

nonUniq(x) returns items in x that occur more than once (indices or values)

Usage

1
nonUniq(x, value = F, na.rm = T)

Arguments

x

vector or matrix. Missing values are ignored.

value

logical; if TRUE, return the unique elements in x that occur more than once. If FALSE (default), return their indices.

na.rm

logical; if TRUE, ignore missing values (NA's)

Value

If value==F, an integer vector with positions (indices) of non-unique elements of x; otherwise, a vector with the unique elements of x that occur more than once. Thus: all(nonUniq(x, value=T)==unique(x[nonUniq(x)])) is TRUE

Author(s)

M.W.Rowe, mwr.stats@gmail.com


mwrowe/microRutils documentation built on June 12, 2021, 2:41 p.m.