Can't use ggplot2 to visualize 'flights' data


This morning, I tried to visualize 'flights' data from nycflights13 package using ggplot. It didn't seem to be working perfectly, it shows something like this in the environment window "Large gg( 9 elements, 48.7 MB)".

It just keeps happening on and off with other datasets too. Not really sure what it means and how to get it fixed. I'll appreciate if somebody could help with it. Thanks!!

Can you post your code and sessionInfo() here, please?

Hi, I haven't got the same code, atm, but I've got similar issues with diamonds dataset. Here's the exact code I used to create ... :

diamonds <- diamonds %>%
ggplot(aes(carat, price))+ geom_bin2d()

furthermore, I can't install or load in 'hexbin' package either. It says "install.packages(hexbin)
Error in install.packages : object 'hexbin' not found"

We really need more information
At the veery least we need your complete set of errer messages.

However the complete code and some sample data would likely be useful.

See this on how to make a reproducible example (reprex) for some suggestions

Just an idea: try without saving in a variable:

diamonds %>%
ggplot(aes(carat, price))+ geom_bin2d()

Or alternatively, save in a variable, then call this variable:

plot_diamonds <- diamonds %>%
ggplot(aes(carat, price))+ geom_bin2d()


Try with quotes:


This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.