Calculate standard deviation of x
, where x
can be
an rvec. If x
is an rvec, separate standard deviations
are calculated for each draw.
Arguments
- x
A numeric vector or R object, including an
rvec()
.- na.rm
Whether to remove
NA
s before calculating standard deviations.
Details
To enable different behavior for rvecs and for ordinary vectors,
the base R function stats::sd()
is turned into a generic,
with stats::sd()
as the default.
For details on the calculations, see the documentation
for stats::sd()
.