The constructor takes a list of values, a single array ref, or a single
Statistics::Basic::Vector as arguments. It returns a
Note: normally youd use the mean() constructor, rather than building these by hand using new().
|<B>B>is_multimodal()<B>B>||Statistics::Basic::Mode objects sometimes return Statistics::Basic::Vector objects instead of numbers. When is_multimodal() is true, the mode is a vector, not a scalar.|
|<B>B>_OVB::import()<B>B>||This module also inherits all the overloads and methods from Statistics::Basic::_OneVectorBase.|
This object is overloaded. It tries to return an appropriate string for the calculation or the value of the computation in numeric context.
If evaluated as a string, Statistics::Basic::Mode will try to format a number (like any other Statistics::Basic object), but if the object is_multimodal(), it will instead return a Statistics::Basic::Vector for stringification.
$x = mode(1,2,3); $y = mode(1,2,2); print "$x, $y\n"; # prints: [1, 2, 3], 2
If evaluated as a number, a Statistics::Basic::Mode will raise an error when the object is_multimodal().
Paul Miller <email@example.com>
Copyright 2012 Paul Miller Licensed under the LGPL
perl(1), Statistics::Basic, Statistics::Basic::_OneVectorBase, Statistics::Basic::Vector
|perl v5.20.3||STATISTICS::BASIC::MODE (3)||2012-01-23|