Skip to content

Instantly share code, notes, and snippets.

@cimentadaj
Last active August 15, 2016 14:27
Show Gist options
  • Save cimentadaj/ab7015494fd42999839fc5ca001fd4f4 to your computer and use it in GitHub Desktop.
Save cimentadaj/ab7015494fd42999839fc5ca001fd4f4 to your computer and use it in GitHub Desktop.
## This plots the distribution of the Structure.Cost.
ggplot(housing, aes(x = Structure.Cost, color=region)) + geom_bar()
## geom_bar automatically transforms the continuous variables into 'bins' and then plots
## the total number of 'bins' and its total counts. This package has a special function
## that does that called stat_bin().
## What will the output of this code be?
ggplot(housing, aes(x = Structure.Cost, color=region)) + stat_bin()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment