[R] Line plot with 3 points

Roger Peng rpeng at stat.ucla.edu
Fri Jun 21 03:54:47 CEST 2002


Would something like this work? :

df <- read.table("mydataframeblahblah")
yr <- range(c(df$onehr, df$fourhr, df$tenhr))
plot(0,0, type="n", ylim=yr, xlim=c(0, 10))
for(i in 1:nrow(df)) lines(c(1,4,10), df[i, c("onehr","fourhr","tenhr")])

I haven't actually tried this out but maybe something like this is what
you want?

-roger
_______________________________
UCLA Department of Statistics
rpeng at stat.ucla.edu
http://www.stat.ucla.edu/~rpeng

On Thu, 20 Jun 2002, Pauline Gu wrote:

> Dear R-experts,
> 
> I have a data file df as the following:
> 
> genename		variable at 1hr		variable at 4 hr variable 
at 10 hr
> gene1
> gene2
> .
> .
> .
> gene5000
> 
> I would like to have a graph with X-axis as the time point (1hr, 4hr, 
> 10hr), and Y-axis as the value of the variable.  So, basically, I want to 
> do a line with the three different values at 1hr , 4hr and 10hr for all the 
> 5000 genes.  My purpose is to see a pattern for these genes.  I am 
> expecting more genes with high values at 1hr than 4hr.
> 
> I tried to use ts package, but, they only allow 10 series.  I searched the 
> R-help archive, but found nothing.  Can anyone point me to the right direction?
> 
> Thanks in advance for your help.
> 
> Pauline
> 
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> 

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list