Last chance! 50% off unlimited learning
Sale ends in
Complex generalizations of stats::sd()
and stats::var()
var(x, y=NULL, na.rm=FALSE,use)
sd(x, na.rm=FALSE)
Complex vector or matrix
Boolean with default FALSE
meaning to leave
NA
values present and TRUE
meaning to remove them
Ignored
Intended to be broadly compatible with stats::sd()
and
stats::var()
.
If given real values, var()
and sd()
return the variance
and standard deviation as per ordinary real analysis. If given complex
values, returns the complex generalization in which Hermitian transposes
are used.
If z
is a complex matrix, var(z)
returns the variance of
the rows.
These functions use stats::var()
(for the record, I disagree with the rationale
for
# NOT RUN {
sd(rcnorm(10)) # imaginary component suppressed by zapim()
var(rcmvnorm(1e5,mean=c(0,0)))
# }
Run the code above in your browser using DataLab