NAME
crosstable -- Produce the crosstable from the 2 column data. Can also sum up a additional column by -3 switch option.
2列のデータを度数を数えて、クロステーブルにする。
Count the numbers of the frequencies of the combination of the 2 columns, and produce crosstable.
オプション :
-3 : 2列のデータのさらに左の1列は加算対象の数と見なす。(Sum the first line added to the left of the two columns.)
-~ : 出力表の、縦軸と横軸を反転する。 (Transpose the output table btw. vertical and horizontal axis.)
-= : 入力の1行目を列名の並びと見なし、データの値とは扱わない。2行目からを加算対象のデータとして扱う。(Skip the 1st input line.)
-m N : 出力表において、N をかけ算した数の整数部を表示する。(Multiply number and take Integer part. E.g. N=1e-5)
-v : -3 が指定された場合に他の有用な情報も出力 (個数、空文字列) Other entailing information.
-q : 色を出さないようにする。 No color by ANSI color.
-/ REGEX : 区切り文字の指定。コンマ , などに変更が可能。未指定ならタブ文字。Specify the delimiter. Default : tab
関連するコマンド :
keyvalues
開発上のメモ :
* もっと高速化できるかもしれない。
* Ctrl+Cについての処理をうまく共通化したものをプログラムに加えたい。
* 何行まで処理したかの親切機能が無い。入力を TTYから待っていることの親切機能も無い。
* 縦軸と横軸のそれぞれの表示順序を豊富にしても良さそう。