[R] Test if a sample mean of integers with range -inf; inf is different from zero

R. Michael Weylandt michael.weylandt at gmail.com
Fri May 4 12:24:37 CEST 2012


mean(c) != 0

But if you mean in a statistical sense... t.test() is one possibility.

Michael

On Fri, May 4, 2012 at 5:29 AM, Kay Cichini <kay.cichini at gmail.com> wrote:
> Hi all,
>
> how would you test  if a sample mean of integers with range -inf;inf  is
> different from zero:
>
> # my sample of integers:
> c <- c(-3, -1, 0, 1, 0, 3, 4, 10, 12)
>
> # is mean of c <> 0?:
> mean(c)
>
> Thanks,
> Kay
>
>        [[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.



More information about the R-help mailing list