[R] Odp: mean and sd with number of values?

From: Petr PIKAL <petr.pikal_at_precheza.cz>
Date: Thu, 06 Mar 2008 17:47:23 +0100

Hi

r-help-bounces_at_r-project.org napsal dne 06.03.2008 17:41:06:

> Hi there,
>
> When i do
>
> mean(fl[1:20], na.rm=T)

e.g.

sum(!is.na(fl[1:20]))

Regards
Petr

> sd(fl[1:20], na.rm=T)
>
> I get 20 Results, but now I'd like to know from how many numbers my mean
> and sd are calculated.
>
> How to I use the length() for this, or is this possible?
>
> Because there are missing values in some, but not in all columns. So
> there should be a different count of numbers.
>
> Thanks,
> Martin
>
> --
> Ihr Partner für Webdesign, Webapplikationen und Webspace.
> http://www.roomandspace.com/
> Martin Kaffanke +43 650 4514224
> [příloha signature.asc odstraněna uživatelem Petr PIKAL/CTCAP]
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 06 Mar 2008 - 16:51:42 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 06 Mar 2008 - 18:30:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive