| Title: | A Faster Unique Function |
|---|---|
| Description: | Similar to base's unique function, only optimized for working with data frames, especially those that contain date-time columns. |
| Authors: | Michael Wayne Kearney [aut, cre] (ORCID: <https://orcid.org/0000-0002-0730-4694>) |
| Maintainer: | Michael Wayne Kearney <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.0.1 |
| Built: | 2026-05-25 07:45:17 UTC |
| Source: | https://github.com/mkearney/funique |
Similar to unique, only optimized for working with
date-time columns.
funique(x)funique(x)
x |
Input data. If x is not a data frame or date-time object, then it is
simply passed to |
The unique rows/values of x.
## create example data set d <- data.frame( x = rnorm(1000), y = seq.POSIXt(as.POSIXct("2018-01-01"), as.POSIXct("2018-12-31"), length.out = 10) ) ## sample to create version with duplicates dd <- d[c(1:1000, sample(1:1000, 500, replace = TRUE)), ] ## get only unique rows head(funique(dd)) ## check output identical(unique(dd), funique(dd))## create example data set d <- data.frame( x = rnorm(1000), y = seq.POSIXt(as.POSIXct("2018-01-01"), as.POSIXct("2018-12-31"), length.out = 10) ) ## sample to create version with duplicates dd <- d[c(1:1000, sample(1:1000, 500, replace = TRUE)), ] ## get only unique rows head(funique(dd)) ## check output identical(unique(dd), funique(dd))