Hi,
I'm following the Edureka! tutorial on using ggplot2. The csv file that I'm currently using is called House. The problem that I encountered tonight is creating a histogram that involves using the variable "air_cond" inside the fill function. Here's my code:
ggplot(house, aes(x =price, fill = aircond))+geom_histogram()
What it's suppose to do is to create a histogram that is made up of colors for the variable "air_cond". Instead, it just gave me a histogram made up gray bars. I don't know if it's a problem with my computer or the package itself. Any help is appreciated!
Okay, I found the problem now. It appears that the structure of aircond is in binary numbers. Like 0 represents no air condition and 1 means there is air condition. (e.g., 0=no; 1=yes). The problem now is to convert the binary numbers back to characters. How can I change the numbers back to characters? Again, any help is appreciated as I'm slowly learning R on my own!