Fairly new to R
and wanted to see if this possible. I have the data set below and want to plot x
and y
on the same line so y continues where x left off at 19 and picks up at 21, with ggplot2
.
Would R be able to handle this if i had more columns like, a, b, ect?
Red dots = x
Green dots = y
mydata = structure(list(q = 1:7, x = c(12L, 18L, 21L, 19L, 0L, 0L, 0L),
y = c(0L, 0L, 0L, 0L, 21L, 25L, 23L)), .Names = c("q", "x",
"y"), class = "data.frame", row.names = c(NA, -7L))