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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Thu, 20 Jun 2002, Roger Peng wrote:
|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")])
|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
|> .
|> .
Or use matplot(). E.g.
> a <- data.frame(rnorm(25,0), rnorm(25,5),rnorm(25,10))
> names(a) <- c("1 hr", "4 hr", "10 hr")
> matplot(1:3,t(a), type="l", xaxt="n")
> axis(1,at=1:3, label=names(a))
In this example, you can see a clear pattern. But I am not shure, if you
can see anything with 5000 lines.
Ott
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Thank you so much, Ott, Roger, Don, Rashir and Jim. I tried both Matplot and the regular plotting functions as suggested. It showed me as what I expected. I am able to see some outstanding lines (genes). Thanks again. 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._