ST(1)

πŸ’– ST(1) β€” the st-console era πŸ’–

okay bestie, this is ST(1), a page from the User Contributed Perl Documentation section of your manual, and it's about st-console. pull up a chair, grab a boba, we're doing stats ✨


🌸 NAME 🌸

st-console β€” simple statistics from the command line interface (CLI)


πŸ¦‹ DESCRIPTION πŸ¦‹

st-console is a command-line tool to calculate simple statistics from a file or standard input. that's it, that's the whole vibe. no cap. πŸ’…


πŸŽ€ USAGE πŸŽ€

st-console [options] [input_file]

✨ OPTIONS ✨

🌈 FUNCTIONS 🌈

  • --N|n|count β€” sample size, aka how many of them there are πŸ‘‘
  • --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
⚠️ okay so heads up: the next ones require that the whole dataset is stored in memory, which can be problematic for huge datasets. like, lowkey a big deal if your file is enormous. πŸ’€
  • --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, st-console 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

πŸ’… 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

🧚 INPUT VALIDATION 🧚

by default, st-console skips invalid input with a warning. slay, it's forgiving like that 🫢

you can change this behavior with the following options:

  • --strict β€” throws an error, interrupting process
  • --quiet|q β€” no warning

🌟 AUTHOR 🌟

Nelson Ferraz <nferraz@gmail.com>


πŸ’Œ 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

πŸ‘‘ 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.

Copyright (c) 2013 Nelson Ferraz.

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


and that's the whole page, bestie πŸ’œ this was ST(1) from the User Contributed Perl Documentation section, served up fresh by perl v5.36.0 on 2023-01-31. periodt. go run some stats, you're gonna eat πŸ’…βœ¨

πŸ“¦ where this page comes from