Re: [R] Line Graph greater than 2 variables on plot

2014-08-21 Thread David McPearson
t; > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of Waseq Ziaie > Sent: Thursday, 21 August 2014 08:55 > To: r-help@r-project.org > Subject: [R] Line Graph greater than 2 variables on plot > > Hi all, &

Re: [R] Line Graph greater than 2 variables on plot

2014-08-20 Thread Duncan Mackay
-- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Waseq Ziaie Sent: Thursday, 21 August 2014 08:55 To: r-help@r-project.org Subject: [R] Line Graph greater than 2 variables on plot Hi all, I was wondering if anyone knew how to construct a multiple line graph o

[R] Line Graph greater than 2 variables on plot

2014-08-20 Thread Waseq Ziaie
Hi all, I was wondering if anyone knew how to construct a multiple line graph on R, where there are 2 (or more) sets of data points plotted against some x axis of data, and you can draw a line on the graph connecting each set of data points. for example: time..years. incidence

Re: [R] Line Graph - Greater than 2 variables on plot

2007-09-21 Thread hadley wickham
On 9/21/07, Jim Porzak <[EMAIL PROTECTED]> wrote: > Hi Hadley, > > I'm trying your suggestion to Wayne. Did you mean to say: > > qplot(D, value, data = melt(wag), colour = variable, geom = "line") > ? Ooops, no I meant to say: qplot(D, value, data = melt(wag, id="D"), colour = variable, geom = "l

Re: [R] Line Graph - Greater than 2 variables on plot

2007-09-21 Thread Jim Porzak
Hi Hadley, I'm trying your suggestion to Wayne. Did you mean to say: qplot(D, value, data = melt(wag), colour = variable, geom = "line") ? With the m="D" argument, I get the error: Error in as.data.frame.default(x[[i]], optional = TRUE) : cannot coerce class "function" into a data.frame

Re: [R] Line Graph - Greater than 2 variables on plot

2007-09-21 Thread hadley wickham
Or with a little data manipulation, in ggplot2: library(ggplot2) qplot(D, value, data=melt(wag, m="D"), colour=variable, geom="line") Hadley On 9/21/07, Francisco J. Zagmutt <[EMAIL PROTECTED]> wrote: > You can also use the facilities in the lattice package. Using Jim´s > data names: > > requi

Re: [R] Line Graph - Greater than 2 variables on plot

2007-09-21 Thread Francisco J. Zagmutt
You can also use the facilities in the lattice package. Using Jim´s data names: require(lattice) xyplot(A+B+C~D, data=wag, type="l", auto.key=list(points = FALSE, lines = TRUE, space = "bottom"), ylab="value", main="Three variable plot") Regards, Francisco Jim Lemon wrote: > Wayne Aldo Gavi

Re: [R] Line Graph - Greater than 2 variables on plot

2007-09-21 Thread Jim Lemon
Wayne Aldo Gavioli wrote: > > Hello all, > > I was wondering if anyone knew how to construct a multiple line graph on R, > where there are 2 (or more) sets of data points plotted against some x axis of > data, and you can draw a line on the graph connecting each set of data points. > > For examp

Re: [R] Line Graph - Greater than 2 variables on plot

2007-09-20 Thread jim holtman
This should do it for you: > x <- read.table(textConnection("A B C D + 0.65662.11851.23205 + 0.647 2.08651.232510 + 0.65322.10601.228715 + 0.64872.12901.231320 + 0.65

Re: [R] Line Graph - Greater than 2 variables on plot

2007-09-20 Thread Rolf Turner
On 21/09/2007, at 1:57 PM, Wayne Aldo Gavioli wrote: > > > Hello all, > > I was wondering if anyone knew how to construct a multiple line > graph on R, > where there are 2 (or more) sets of data points plotted against > some x axis of > data, and you can draw a line on the graph connecting ea

[R] Line Graph - Greater than 2 variables on plot

2007-09-20 Thread Wayne Aldo Gavioli
Hello all, I was wondering if anyone knew how to construct a multiple line graph on R, where there are 2 (or more) sets of data points plotted against some x axis of data, and you can draw a line on the graph connecting each set of data points. For example: A B C