STK++ 0.9.13
|
You can easily get the mean of a whole vector or a matrix containing missing values using the expression.
In some cases you may want to get the mean for each column of an array with missing values. You can get it in a PointX
vector using either the code
or the code
The method A.safe()
will replace any missing (or NaN) values by zero. In some cases it's not sufficient, Suppose you know your data are all positive and you want to compute the log-mean of your data. In this case, you will rather use
and all missing (or NaN) values will be replaced by one.