Re: [R] Problem with mean()

2018-07-21 Thread Jeff Newmiller
Read ?mean. Look at the argument list. The mean function only applies to the first argument. On July 21, 2018 9:39:42 AM PDT, John Kane via R-help wrote: >Either I am doing something very stupid or my R installation has a >glitch. What am I missing? >dd1  <- 50 >dd2  <- 54 > >mean(dd1, dd2)

Re: [R] Problem with mean()

2018-07-21 Thread Duncan Murdoch
On 21/07/2018 12:39 PM, John Kane via R-help wrote: Either I am doing something very stupid or my R installation has a glitch. What am I missing? dd1  <- 50 dd2  <- 54 mean(dd1, dd2) [1] 50  # wrong Read the help page ?mean. You are specifying the parameters x and trim. Duncan Murdoch

Re: [R] Problem with mean()

2018-07-21 Thread Rui Barradas
Hello, The first argument of mean is a vector, the dots argument is to be "passed to or from other methods." (from ?mean) Try instead mean(c(dd1, dd2)) Hope this helps, Rui Barradas Às 17:39 de 21-07-2018, John Kane via R-help escreveu: Either I am doing something very stupid or my R

[R] Problem with mean()

2018-07-21 Thread John Kane via R-help
Either I am doing something very stupid or my R installation has a glitch. What am I missing? dd1  <- 50 dd2  <- 54 mean(dd1, dd2) [1] 50  # wrong (dd1 + dd2)/2 [1] 52 # correct aa  <- c(48, 52, 56, 54, 52) mean(aa) [1] 52.4 # correct [[alternative HTML version deleted]]

Re: [R] problem about mean function in ffbase package

2013-08-02 Thread Milan Bouchet-Valat
Le jeudi 01 août 2013 à 00:10 +0800, Chaos Chen a écrit : Hi all, I experienced some unmatched result using mean function in ffbase package and cannot figure out what's wrong. I have a simulated ff vector with 10 numbers inside and want to calculate its mean. But the results are

Re: [R] problem about mean function in ffbase package

2013-08-02 Thread Milan Bouchet-Valat
Le jeudi 01 août 2013 à 00:10 +0800, Chaos Chen a écrit : Hi all, I experienced some unmatched result using mean function in ffbase package and cannot figure out what's wrong. I have a simulated ff vector with 10 numbers inside and want to calculate its mean. But the results are

[R] problem about mean function in ffbase package

2013-07-31 Thread Chaos Chen
Hi all, I experienced some unmatched result using mean function in ffbase package  and cannot figure out what's wrong. I have a simulated ff vector with 10 numbers inside and want to calculate its mean. But the results are quite different. With mean( ) function in ffbase package, the

[R] Problem with mean

2010-03-09 Thread venkata kirankumar
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

Re: [R] Problem with mean

2010-03-09 Thread Erik Iverson
See FAQ 7.31 venkata kirankumar 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

Re: [R] Problem with mean

2010-03-09 Thread Ista Zahn
round(mean(val), digits=16) -Ista On Tue, Mar 9, 2010 at 10:23 AM, venkata kirankumar kiran4u2...@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