[R] Problem with mean

Ista Zahn istazahn at gmail.com
Tue Mar 9 16:32:05 CET 2010


round(mean(val), digits=16)

-Ista

On Tue, Mar 9, 2010 at 10:23 AM, venkata kirankumar
<kiran4u2all at gmail.com> wrote:
> Hi all,
> I got one intresting problem with caliculating mean that is
>
> while i am taking mean of values
>
> *0.6, -0.8, 4, -3.8*
>
> using
> *val<-c(0.6, -0.8, 4, -3.8)*
> *mean(val)*
> it given result as
> *2.775558e-17*
>
> but the actual result is  *"0"*
>
> can any one suggest how can I get correct mean result in this case
>
> can any one suggest how I can farward
>
> thanks in regards
>
> kiran
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>



-- 
Ista Zahn
Graduate student
University of Rochester
Department of Clinical and Social Psychology
http://yourpsyche.org



More information about the R-help mailing list