Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 16 lines (13 sloc) 0.395 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#' Remove duplicates.
#'
#' @name stat_unique
#' @export
#' @examples
#' ggplot(mtcars, aes(vs, am)) + geom_point(alpha = 0.1)
#' ggplot(mtcars, aes(vs, am)) + geom_point(alpha = 0.1, stat="unique")
StatUnique <- proto(Stat, {
  objname <- "unique"
  desc <- "Remove duplicates"
  
  default_geom <- function(.) GeomPoint
  
  calculate_groups <- function(., data, scales, ...) unique(data)
})
Something went wrong with that request. Please try again.