Closed
Description
I can plot a histogram with any of:
my_data <- rnorm(100);
qplot(my_data);
qplot(my_data, geom="auto");
qplot(my_data, geom="histogram");
my_data %>% qplot;
my_data %>% qplot(geom="auto");
my_data %>% qplot(geom="auto", x = .);
my_data %>% ggplot(data = data.frame(foo=.), mapping=aes(x = foo)) +
geom_histogram();
I would expect the same behaviour from
my_data %>% qplot(geom="histogram");
my_data %>% qplot(geom="histogram", x = .);
but instead these two fail with
Don't know how to automatically pick scale for object of type list.
Defaulting to continuous
Error in as.data.frame.default(x[[i]], optional = TRUE,
stringsAsFactors = stringsAsFactors) :
cannot coerce class "c("gg", "ggplot")" to a data.frame