Hello,
>
> There are some differences between lmin and mini:
>
>
> * mini/maxi handle matrices. Though the documentation doesn't specify
> the definition, in fact it is the column-wise min/max (which seems
> arbitrary, but whatever).
>
The reason for this particular behavior is that the package was written
to handle both univariate and multivariate samples. Univariate samples
should be entered as lists of numbers or one-column matrices, and here
lmin(matrix([1],[2],[3]));
fails.
A multivariate sample of size m must be entered as an mxn matrix, where
each row represents a n-dimensional record, and each column is
associated to a random variable (or factor). When we apply function
'mean' to this matrix, we want the mean vector to be returned:
(%i11) /* wind velocity in 5 meteorological stations in Ireland.
100 records. */
s2 : read_matrix (file_search ("wind.data"))$
(%i12) /* 1st record */
s2[1];
(%o12) [10.25,10.83,12.58,18.5,15.04]
(%i13) /* mean wind velocity in the five stations */
mean(s2);
(%o13) [9.9485,10.1607,10.8685,15.7166,14.8441]
and we expect functions returning extrema to have a similar behavior:
(%i14) /* lowest records */
mini(s2);
(%o14) [0.58,0.5,2.67,5.25,5.17]
and here lmin fails again.
Maybe this seems arbitrary, but I think that it is an standard fact that
matrices with records of multivariate observations are stored in plain
text files with this interpretation ("Applied Multivariate Statistical
Analysis" by R. Johnson and D. Wichern, Prentice Hall, for example).
In any case, if someone's data are stored in the other way, function
'transpose' will be of great help.
The univariate sample in one-column matrix form is compatible with this
interpretation:
(%i18) mini(matrix([1],[2],[3]));
(%o18) [1]
On the other hand, a one-row matrix is a multivariate sample of size 1
(four variables were measured on only one individual):
(%i19) mini(matrix([1,2,3,4]));
(%o19) [1,2,3,4]
You say lmin/lmax handle sets. They could also handle statistical data
in this specific way if we had a frame object (like R), which informs
lmin/lmax on the particularities of the argument. Is it time to extend
the descriptive package to amatrix?
A more detailed description on the sample formats is in the introduction
to the package:
http://maxima.sourceforge.net/docs/manual/en/maxima_45.html
Your other comments could be treated as bugs to be fixed.
And yes, the documentation should be more clear about these functions.
--
Mario