Re: [R] efficient overlapping average curve on original curves

2012-09-22 Thread eliza botto
Dear Arun, Rui and David, thankyou very much. i learnt alot from your replies. eliza botto > Date: Fri, 21 Sep 2012 18:58:18 -0700 > From: smartpink...@yahoo.com > To: ruipbarra...@sapo.pt > CC: r-help@r-project.org > Subject: Re: [R] efficient overlapping average curve on

Re: [R] efficient overlapping average curve on original curves

2012-09-21 Thread arun
our="darkred")+opts(legend.position="none") A.K. - Original Message - From: Rui Barradas To: arun Cc: eliza botto ; R help Sent: Friday, September 21, 2012 9:18 PM Subject: Re: [R] efficient overlapping average curve on original curves And with ggplot2. libra

Re: [R] efficient overlapping average curve on original curves

2012-09-21 Thread arun
(x) mean(x))[,4]~X1,data=mat1,type="l",col="black",lwd=2) p0+p1 A.K. - Original Message - From: Rui Barradas To: eliza botto Cc: "r-help@r-project.org" Sent: Friday, September 21, 2012 7:33 PM Subject: Re: [R] efficient overlapping average curve on origin

Re: [R] efficient overlapping average curve on original curves

2012-09-21 Thread Rui Barradas
Rui Barradas To: eliza botto Cc: "r-help@r-project.org" Sent: Friday, September 21, 2012 7:33 PM Subject: Re: [R] efficient overlapping average curve on original curves Hello, Something like this? # Make up some data mat <- matrix(rnorm(100*37), ncol = 37) mat <- apply(ma

Re: [R] efficient overlapping average curve on original curves

2012-09-21 Thread David Winsemius
On Sep 21, 2012, at 4:11 PM, eliza botto wrote: > > Dear useRs, > > my question could be very basic for which i apologize in advance. > Each column of a matrix with dimensions 365 rows and 37 columns was drawn > against another matrix of dimensions 365 rows and 1 column. with that i was > ab

Re: [R] efficient overlapping average curve on original curves

2012-09-21 Thread Rui Barradas
Hello, Something like this? # Make up some data mat <- matrix(rnorm(100*37), ncol = 37) mat <- apply(mat, 2, cumsum) avg <- rowMeans(mat) # matplot - matrix plot matplot(mat, type = "l") lines(avg, lwd = 2) I've also seen some very nice graphics for ploting many lines in ggplot2 using trans

[R] efficient overlapping average curve on original curves

2012-09-21 Thread eliza botto
Dear useRs, my question could be very basic for which i apologize in advance. Each column of a matrix with dimensions 365 rows and 37 columns was drawn against another matrix of dimensions 365 rows and 1 column. with that i was able to draw 37 curves on the same axis. now i want to draw an av