[R] calculating mean excluding zeros
anopheles123 at gmail.com
Tue Jul 19 22:48:13 CEST 2011
You can do it by subsetting or indexing
On Tue, Jul 19, 2011 at 4:36 PM, Dimitri Liakhovitski
<dimitri.liakhovitski at gmail.com> wrote:
> Sorry if it's been discussed before - don't seem to find it.
> I'd like to calculate a mean while ignoring zeros.
> "mean" doesn't seem to have an option for that.
> Any other function/package that could do it?
> Thanks for a pointer!
> Dimitri Liakhovitski
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help