Learn R Programming

circular (version 0.3-7)

unique.circular: Extract Unique Elements from a circular vector

Description

unique.circular returns a circular vector but with duplicate elements removed.

Usage

## S3 method for class 'circular':
unique(x, incomparables = FALSE, fromLast = FALSE, \dots)

Arguments

x
a vector or a data frame or an array or NULL.
incomparables
a vector of values that cannot be compared. Currently, FALSE is the only possible value, meaning that all values can be compared.
fromLast
logical indicating if duplication should be considered from the last, i.e., the last (or rightmost) of identical elements will be kept. This only matters for names or di
...

Value

  • An object of the same type of x. but if an element is equal to one with a smaller index, it is removed.

Details

This is a method for circular object. See the documentation of unique.

See Also

unique

Examples

Run this code
x <- rvonmises(10, circular(0), 10)
unique(x)

Run the code above in your browser using DataLab