Qual é a diferença entre geoms e stats no ggplot2?

Tanto os geoms quanto as estatísticas podem ser usados para fazer gráficos no pacote R ggplot2, e geralmente fornecem resultados semelhantes (por exemplo, geom_area e stat_bin). Eles também costumam ter argumentos ligeiramente diferentes, por exemplo, noGráficos de densidade 2D:

geom_density_2d(mapping = NULL, data = NULL, stat = "density2d",
  position = "identity", ..., lineend = "butt", linejoin = "round",
  linemitre = 1, na.rm = FALSE, show.legend = NA, inherit.aes = TRUE)

stat_density_2d(mapping = NULL, data = NULL, geom = "density_2d",
  position = "identity", ..., contour = TRUE, n = 100, h = NULL, na.rm =
  FALSE, show.legend = NA, inherit.aes = TRUE)

Existem diferenças fundamentais entre os dois tipos de objetos?

questionAnswers(2)

yourAnswerToTheQuestion