App-St

 view release on metacpan or  search on metacpan

script/st  view on Meta::CPAN

=head1 NAME

st - simple statistics from the command line interface (CLI)

=head1 DESCRIPTION

C<st> is a command-line tool to calculate simple statistics from a
file or standard input.

=head1 USAGE

  st [options] [input_file]

=head2 OPTIONS

=head3 FUNCTIONS

  --N|n|count           # sample size
  --min                 # minimum
  --max                 # maximum
  --mean|average|avg|m  # mean
  --stdev|sd            # standard deviation
  --stderr|sem|se       # standard error of mean
  --sum|s               # sum of elements of the sample
  --variance|var        # variance

The following options require that the whole dataset is stored in
memory, which can be problematic for huge datasets:

  --q1                  # first quartile
  --median|q2           # second quartile, or median
  --q3                  # third quartile
  --percentile=f        # percentile=<0..100>
  --quartile=i          # quartile=<1..4>

If no functions are selected, C<st> will print the default output:

    N     min  max  sum  mean  stddev

You can also use the following predefined sets of functions:

  --summary   # five-number summary (min q1 median q3 max)
  --complete  # everything

=head3 FORMATTING

    --format|fmt|f=<value>  # default: "%g"

Examples of valid formats:

      %d    signed integer, in decimal
      %e    floating-point number, in scientific notation
      %f    floating-point number, in fixed decimal notation
      %g    floating-point number, in %e or %f notation

  --delimiter|d=<value>   # default: "\t"

  --no-header|nh          # don't display header
  --transpose-output|to   # switch rows and columns

=head3 INPUT VALIDATION

By default, C<st> skips invalid input with a warning.

You can change this behavior with the following options:

  --strict   # throws an error, interrupting process
  --quiet|q  # no warning

=head1 AUTHOR

Nelson Ferraz L<<nferraz@gmail.com>>

=head1 CONTRIBUTE

Send comments, suggestions and bug reports to:

https://github.com/nferraz/st/issues

Or fork the code on github:

https://github.com/nferraz/st

=head2 THANKS

imurray, who suggested a different algorithm for calculating variance.

asgeirn, who suggested a input filter and helped to remove some
warnings.

gabeguz, who modified the script to make it more portable.

=head1 COPYRIGHT

Copyright (c) 2013 Nelson Ferraz.

This program is free software; you can redistribute it and/or modify
it under the MIT License (see LICENSE).



( run in 0.529 second using v1.01-cache-2.11-cpan-13bb782fe5a )