sunique {polypharmacy}R Documentation

Utils

Description

Combination of sort() and unique().

Usage

sunique(x, decreasing = FALSE, na.last = FALSE)

Arguments

x

Vector to sort and remove duplicates.

decreasing

TRUE or FALSE.

na.last

NA removes NAs, TRUE show NAs at the end and FALSE show NAs at the beginning.

Value

x sorted and without duplicates.

Examples

sunique(c(1, 1, 1, 2, 2, NA, NA))
sunique(c(1, 1, 1, 2, 2, NA, NA), na.last = TRUE)
sunique(c(1, 1, 1, 2, 2, NA, NA), na.last = NA)
sunique(c(1, 1, 1, 2, 2, NA, NA), decreasing = TRUE)

[Package polypharmacy version 1.0.0 Index]