justbeginner
justbeginner

Reputation: 3

How can I use R graph?

I'm just a R beginner and know almost nothing about R, but trying to get to know how to use R. Here is the imported data and I'd like to use ggplot2 to see the graph.

1     Month    Total    PV RealV  ReV buyperpv  OCP DepV  OPV Buy
2         2 55090951 23937  5580 4774     1600 5.75 1213 2100 426
3         3 43421380 23746 10589 4884     1181 5.05  863 1502 317

I have tried codes like these...

library(ggplot2)  
qplot("FebMarTot2")

But what I see is only grey background image like this.....
Click Here

What am I doing wrong?

Upvotes: 0

Views: 67

Answers (1)

dchen71
dchen71

Reputation: 170

You did not specific the variables in the data that you wanted to look so you ended up looking at a qplot count of character "FebMarTot2".

ggplot can be highly customizable depending on what kind of plot you are looking for but the following may give you hints:

ggplot(FebMarTot2,aes(x=Month, y=Total)) + geom_line()

or

qplot(x=PV, y=Total, data=test)

Try looking at the following links for references:

Upvotes: 1

Related Questions