Results 1 to 2 of 2

Math Help - Drawing a Line Graph in R

  1. #1
    Super Member craig's Avatar
    Joined
    Apr 2008
    Posts
    748
    Thanks
    1
    Awards
    1

    Drawing a Line Graph in R

    While the question in itself isn't University standard, using the programming language R to do the question is, well I think so anyway

    Will attach the .csv used in the code with this post.

    Here is my code to draw the line graph in R, as far as I can see it should work, but it doesn't... any ideas?

    Code:
    earn <- read.table("ave-earn.csv",sep=",",header=T)
    attach(earn)
    plot(Quarter,Av,type="l",
    ylab="Earnings", xlab="",
    main="Average Earnings\n1994 to 2000",
    axes=F,xlim=c(1,28))
    axis(2)
    axis(1,at=seq(1,28,4),labels=seq(1994,2000,1))
    box()
    detach(earn)
    Hopefully some of you will have a little more idea about R than I do

    Thanks in advance

    Craig
    Attached Files Attached Files
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Super Member craig's Avatar
    Joined
    Apr 2008
    Posts
    748
    Thanks
    1
    Awards
    1
    I wasn't permitted to upload a .csv file so had to save it as a .xls instead, so if anyone feels like helping out on this question then open it in excel and save as a .csv file.

    Thanks

    Craig
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Drawing a graph: X and Y values?
    Posted in the Differential Equations Forum
    Replies: 1
    Last Post: April 3rd 2010, 07:49 PM
  2. Need some help drawing a graph
    Posted in the Calculus Forum
    Replies: 1
    Last Post: June 13th 2009, 03:56 PM
  3. Drawing of parabola graph
    Posted in the Geometry Forum
    Replies: 1
    Last Post: March 7th 2008, 11:25 PM
  4. Drawing a binary graph
    Posted in the Discrete Math Forum
    Replies: 6
    Last Post: December 4th 2007, 03:00 PM
  5. Drawing a graph of function F(x,y)
    Posted in the Pre-Calculus Forum
    Replies: 1
    Last Post: February 12th 2007, 11:27 AM

Search Tags


/mathhelpforum @mathhelpforum