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 (d

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 ins

[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 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 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 res

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 sugge

[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 th