Catman...t_mean(3pm)
β¨ NAME β¨
Catmandu::Fix::stat_mean β bestie, this one calculates the mean of an array π
It's a Catmandu::Fix, so you already know the vibe: you drop it in your fix file, it does its lil math thing, and it slays. π
πΈ SYNOPSIS πΈ
Okay so picture this: you've got a field called foo and it's holding an array like [1,2,3,4]. You want the average. Boom. That's it. That's the whole job. π«Ά
# Calculate the mean of foo. E.g. foo => [1,2,3,4]
stat_mean(foo) # foo => '2.5'
So like β you pass in foo, and the mean of 1, 2, 3 and 4 comes out as '2.5'. The way it just replaces the array with the mean in placeβ¦ main character energy, no cap. π₯
ngl bestie, notice the quotes around '2.5' β that's literally what the example shows, so that's what you get. π
π SEE ALSO π
Catmandu::Fixβ the parent fix situation, iykyk. Go read it if you wanna know how fixes fit into your whole pipeline. π
And that's the whole page, periodt. This lil icon of a manpage is from the User Contributed Perl Documentation, and it's sitting pretty in perl v5.36.0, dated 2023-02-06. β¨π¦π Go calculate some means, bestie β you're gonna eat. π
π¦ where this page comes from
- debian bookworm: libcatmandu-stat-perl 0.13-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libcatmandu-stat-perl 0.13-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcatmandu-stat-perl 0.13-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatmandu-stat-perl 0.13-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatmandu-stat-perl 0.13-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms