Re: [R] ggplot: connect points with line (not in order)

2015-04-05 Thread Brian Smith
thanks! On Sun, Apr 5, 2015 at 9:15 AM, billy am wrote: > Will this do? > > ggplot(mydat,aes(xx,yy)) + geom_path() > > From : > http://stackoverflow.com/questions/15706281/controlling-order-of-points-in-ggplot2-in-r > > > >

Re: [R] ggplot: connect points with line (not in order)

2015-04-05 Thread billy am
Will this do? ggplot(mydat,aes(xx,yy)) + geom_path() >From : >http://stackoverflow.com/questions/15706281/controlling-order-of-points-in-ggplot2-in-r -- | http://billyam.com || http://use-r.com || http://shinyse

[R] ggplot: connect points with line (not in order)

2015-04-05 Thread Brian Smith
Hi, I am trying to connect points, but not in a different order than the default value in ggplot. For example: xx <- sample(1:100,5) yy <- sample(1:100,5) mydat <- data.frame(xx,yy) print(mydat) ggplot(mydat,aes(xx,yy)) + geom_point() + geom_line() I want to connect the points as the