From suharto_anggono at yahoo.com  Fri Sep  9 18:52:01 2016
From: suharto_anggono at yahoo.com (Suharto Anggono Suharto Anggono)
Date: Fri, 9 Sep 2016 16:52:01 +0000 (UTC)
Subject: [Rd] R-intro: function 'stderr' and 'sd'
References: <1979148586.1732979.1473439921401.ref@mail.yahoo.com>
Message-ID: <1979148586.1732979.1473439921401@mail.yahoo.com>

In "An Introduction to R" Version 3.3.1, in "4.2 The function tapply() and ragged arrays", after
stderr <- function(x) sqrt(var(x)/length(x))  ,
there is a note in brackets:
Writing functions will be considered later in [Writing your own functions], and in this case was unnecessary as R also has a builtin function sd().

The part "in this case was unnecessary as R also has a builtin function sd()" is misleading. The builtin function sd() doesn't calculate standard error of the mean. It calculates standard deviation. The function 'stderr' can use 'sd':
function(x) sd(x)/sqrt(length(x))



[Rd] R-intro: function 'stderr' and 'sd'
Suharto Anggono Suharto Anggono