Re: [R] Adding average into a matplot?

From: Mike Prager <>
Date: Thu, 10 Apr 2008 13:20:45 -0400

-Halcyon- <> wrote:  

> I have a matrix which is filled with simulation results for several years.
> Example of an output (7 years, 4 simulations):

> My matplot gives me 4 lines, but I would like to add a line with the
> averages of each year for all simulations. Can anyone help me with this?

Take a look at help pages of the following functions: mean, apply, abline.

Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use of tradenames does not constitute a NOAA endorsement.

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Thu 10 Apr 2008 - 17:23:18 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 10 Apr 2008 - 17:30:27 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive