Text::NumericData::Stat - generate statistics for Text::NumericData::File objects
use Text::NumericData::Stat; # read some input file (all columns numeric) my $file = new Text::NumericData::File(\%config,$filename); my $statfile = Text::NumericData::Stat::generate($file); # use individual values print "mean value of first column: ",$statfile->{data}[0][0],"\n"; print "standard error of first column: ",$statfile->{data}[0][1],"\n"; # or just write it down $statfile->Write($outfilename); # one can also restrict statistics to certain columns # indices zero-based $statfile = Text::NumericData::Stat::generate($file, [0, 3, 8]);
This takes a Text::NumericData::File as input and computes statistics for each column, producing a new Text::NumericData::File with each data set representing a column of the input file, the columns of the new file containing the respective mean and standard deviation values (or more statistic measures in future).
To install Text::NumericData, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::NumericData
CPAN shell
perl -MCPAN -e shell install Text::NumericData
For more information on module installation, please visit the detailed CPAN module installation guide.