Skip to content
Prev 78183 / 398503 Next

'mean' function

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
--- Lisa Wang <lisawang at uhnres.utoronto.ca> wrote:

            
______________________________________________
http://www.R-project.org/posting-guide.html