0

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?

Garf365
  • 3,619
  • 5
  • 29
  • 41
  • What kind of graph are you trying to make? Looks like you want to change the stat variable in the plotting function but I am unsure what you are trying to plot. – dchen71 Jul 25 '16 at 06:56
  • Thanks, dcchen71! In the data, Total means sales profit and I want to know which factor affects sales profit by checking the graph. – justbeginner Jul 25 '16 at 07:11
  • Maybe remove quotes? `qplot(FebMarTot2)` , also read about [How to make a great R reproducible example?](http://stackoverflow.com/questions/5963269) – zx8754 Jul 25 '16 at 08:17
  • Thanks, zx8754, once I removed quotes, but it didn't work. I would have to try some other ways. – justbeginner Jul 25 '16 at 08:43

1 Answers1

1

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:

dchen71
  • 170
  • 1
  • 13