std | R Documentation |
Standard deviation of the values of x
.
std(x, flag=0)
x |
numeric vector or matrix |
flag |
numeric scalar. If |
If flag = 0
the result is the square root of an unbiased estimator of
the variance. std(X,1)
returns the standard deviation producing the
second moment of the set of values about their mean.
Return value depends on argument x
. If vector, returns the
standard deviation. If matrix, returns vector containing the standard
deviation of each column.
flag = 0
produces the same result as R's sd().
std(1:10) # 3.027650
std(1:10, flag=1) # 2.872281
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.