Hi Eliza, Perhaps the following?
matpoints(t(dat), type = 'l') HTH, Jorge.- On Sat, Mar 22, 2014 at 10:18 PM, eliza botto <eliza_bo...@hotmail.com>wrote: > > Dear useRs, > I have two column vectors of different lengths say x=1,2,3,4,5,6,7,8 and > y=1,2,3,4,5. I wanted to plot them by using "points()" command over an > already existed image but got an error, "Error in xy.coords(x, y) : 'x' and > 'y' lengths differ".What i actually wanted to do was to plot the points in > the following format. > > dat <- read.table(text=" > 1 2 3 4 5 6 7 8 > 1 (1,1) (1,2) (1,3) (1,4) (1,5) (1,6) (1,7) (1,8) > 2 (1,1) (1,2) (1,3) (1,4) (1,5) (1,6) (1,7) (1,8) > 3 (1,1) (1,2) (1,3) (1,4) (1,5) (1,6) (1,7) (1,8) > 4 (1,1) (1,2) (1,3) (1,4) (1,5) (1,6) (1,7) (1,8) > 5 (1,1) (1,2) (1,3) (1,4) (1,5) (1,6) (1,7) (1,8) > ",sep="",header=TRUE,stringsAsFactors=FALSE) > How can i do it? > Thankyou very much indeed in advance. > Eliza > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.