Re: [R] 'mean' function

From: Martin Lam <tmlammail_at_yahoo.com>
Date: Sat 01 Oct 2005 - 07:58:41 EST


Type "?mean" and hit "enter" in the console to see the description of the function.

# randomly draw 5 numbers between 1 and 10 without replacement
randomlist = sample(1:10, 5)
# calculate the mean of the list
meanoflist = mean(randomlist)
# show the result
meanoflist

HTH, Martin

> Hello,
>
> Could you please let me know how to see the "mean"
> function in R . The
> following is what I see when type in "mean" and
> "enter"
>
> mean
> function (x, ...)
> UseMethod("mean")
> <environment: namespace:base>
>
> I would like to see how the function is writen.
>
> Thanks a lot
>
> Lisa Wang
> Toronto, Ca
>
> > This e-mail may contain confidential and/or
> privileged information for the sole use of the
> intended recipient. Any review or distribution by
> anyone other than the person for whom it was
> originally intended is strictly prohibited. If you
> have received this e-mail in error, please contact
> the sender and delete all copies. Opinions,
> conclusions or other information contained in this
> e-mail may not be that of the organization.>



> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Oct 01 08:04:19 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 18:07:21 EST