| sdCalc {NCStats} | R Documentation |
Shows the steps in the manual calculation of the standard deviation.
sdCalc(x, digits = getOption("digits"))
## S3 method for class 'sdCalc'
print(x, ...)
x |
A numeric vector. |
digits |
A numeric indicating the number of decimals
to round the numeric summaries to. If left at
|
... |
Other arguments to the generic |
A list containing the sample size (n), sample mean
(mean), data.frame of intermediate calculations
(tbl), and number of digits to print
(digits)).
This function shows a table of intermediate output in the
calculation of the standard deviation. Used purely to
demonstrate the hand-calculation of the standard
deviation. Use sd() to actually computer the
standard deviation.
sd.
## Numeric vector y <- runif(8) # typical computation sd(y) # this function sdCalc(y) # this function, controlling the number of digits sdCalc(y,digits=4)