-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
Description
Hello,
library(ggplot2)
dat <- structure(list(include = c(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE
), Petal_Width = c(0.1234567, 1.4321, 1.5, 1.5, 1.3, 1.5), Species = c("setosa",
"versicolor", "versicolor", "versicolor", "versicolor", "versicolor"
), Date = structure(c(1484524800, 1484611200, 1484697600, 1484784000,
1484870400, 1485043200), class = c("POSIXct", "POSIXt"), tzone = "UTC")), .Names = c("include",
"Petal_Width", "Species", "Date"), class = c("tbl_df", "tbl",
"data.frame"), row.names = c(NA, -6L))
ggplot(dat, aes(x=Petal_Width)) + geom_density() + facet_wrap("Date")
This generates this error:
Error: Discrete value supplied to continuous scale
In addition: Warning messages:
1: Groups with fewer than two data points have been dropped.
2: Groups with fewer than two data points have been dropped.
3: Groups with fewer than two data points have been dropped.
4: Groups with fewer than two data points have been dropped.
5: Groups with fewer than two data points have been dropped.
6: Groups with fewer than two data points have been dropped.
In fact, all groups are dropped. Then I think the error message is not very appropriate.