0

I've started working with R and I'm trying to make plot graphs with multiple variables using a matrix as imported data set. Is it even possible? this is the matrix

    X2006   X2007   X2008   X2009   X2011   X2012   X2013   X2014
1   2239    2008    459     465     365     393     455     2430
2   249      132    115     120     101     67      88      90
3   543     830     2118    2283    3251    3239    2671    508
r2evans
  • 77,184
  • 4
  • 55
  • 96
  • I guess the matrix came out wrong, sorry about that – David930115 Apr 01 '15 at 22:41
  • 1
    You need to show us what you've tried until now – Yonatan Nir Apr 01 '15 at 22:42
  • What are you trying to plot? Please edit your question and add additional details. I suggest you start visiting [The Quick-R tutorial: Graphs](http://statmethods.net/graphs/index.html) and [Advanced Graphs](http://statmethods.net/advgraphs/index.html) – Barranka Apr 01 '15 at 22:53
  • 2
    Welcome to StackOverflow David, to answer your first question. Yes, it is definitely possible with R! To know what you can do with your data have a look at this [link](https://support.rstudio.com/hc/en-us/articles/201057987-Quick-list-of-useful-R-packages). Also, have a look at [introduction to ggplot2](http://blog.echen.me/2012/01/17/quick-introduction-to-ggplot2/) for a detailed explanation about a different graphics package. If you have made an attempt and still have any question. Feel free to ask. – MichaelVE Apr 01 '15 at 23:02
  • And glance at some of the "related questions" in the sidebar: [for ggplot](http://stackoverflow.com/q/9531904/903061), [for base graphics](http://stackoverflow.com/q/2564258/903061) – Gregor Thomas Apr 01 '15 at 23:03
  • 1
    what kind of graphs do you want? Hsitogram? Scatterplot? what you can always do is use the plot function. if m is your matrix then `m[,1]` is the first column of your matrix and `m[,2]` is the second column. Try `plot(x=m[,1],y=m[,2])` and see what happens – maRtin Apr 01 '15 at 23:07

0 Answers0