[R] looking for a plot function

From: bogdan romocea <br44114_at_yahoo.com>
Date: Thu 07 Apr 2005 - 06:18:34 EST


Dear useRs,

I have a data frame and I want to plot all rows. Each row is represented as a line that links the values in each column. The plot looks like this:

dfr <- data.frame(A=sample(1:50,10),B=sample(1:50,10),

        C=sample(1:50,10),D=sample(1:50,10))
xa <- 10*1:4
plot(c(10,40),c(0,50))
for (i in 1:nrow(dfr)) {

	lines(xa,dfr[i,],pch=20,type="o")
	}

Things get more complicated because I want the columns to be rescaled so as to fit nicely on a graph (for example if A has values between 0 and 100 but B has values between 100 and 1000, then rescale A or B), labels etc. Is there a function that can do plots like this?

Thank you,
b.



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Apr 07 06:22:44 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:02 EST