Spreadsheets - Calculate sum, mean, standard deviation, max, and min across selection of cells
4 min read
Accumulate selection of cells
⟨rows⟩: comma separated list of (ranges of) desired columns, e.g.: 1-3,Z
⟨columns⟩: comma separated list of (ranges of) desired columns, e.g.: even,X-Y
⟨accumulative calculation⟩: update the value of \nAccum for each touched cell, in the order left to right and top to bottom, e.g.: \nAccum+1 to count cells
⟨neutral value⟩: initial value of \nAccum. Leave empty for default 0. Product, minimun, and maximun required different initial values
Available dynamic values for calculation:
\nAccum: value assigned after last update
\nCell: value of the current cell
\therownum: current row number
\thecolnum: current column number
Add expenses
Calculate the following values, with row number r:
Trip distance distr:=∣markerr−1−markerr∣ for r∈{4,5,6,9,10,11}
Total price totalr:=pricer⋅overnightsr for r∈{3,4,…,11}
Distance through Mecklenburg Lakeland meck:=∣marker3−marker6∣
Distance on Havel River havel:=∣marker8−marker11∣
Maximum overnight price max:=max(price3,…,price11)
Total accommodation cost accom:=∑r=311totalr
Daily average avg:=accom÷count-nonnull(total3,…,total11)
Regex
This module provides regular expression testing, extraction of submatches, splitting, and replacement, all acting on token lists. The syntax of regular expressions is mostly a subset of the pcre syntax (and very close to posix), with some additions due to the fact that TEX manipulates tokens rather than characters. For performance reasons, only a limited set of features are implemented. Notably, back-references are not supported.