Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (16 sloc) 0.6 kB
#' Remove duplicates.
#'
#' @export
#' @inheritParams stat_identity
#' @examples
#' ggplot(mtcars, aes(vs, am)) + geom_point(alpha = 0.1)
#' ggplot(mtcars, aes(vs, am)) + geom_point(alpha = 0.1, stat="unique")
stat_unique <- function (mapping = NULL, data = NULL, geom = "point", position = "identity", ...) {
StatUnique$new(mapping = mapping, data = data, geom = geom, position = position, ...)
}
StatUnique <- proto(Stat, {
objname <- "unique"
desc <- "Remove duplicates"
default_geom <- function(.) GeomPoint
calculate_groups <- function(., data, scales, ...) unique(data)
})
Jump to Line
Something went wrong with that request. Please try again.