TextHistogram
TextHistogram [ flags ] srcTextWave
The TextHistogram operation computes the histogram of a text wave where the output bins represent the counts of occurrences of each unique string found in srcTextWave.
The TextHistogram operation was added in Igor Pro 9.00.
Flags
| /CI | Performs case-insensitive string comparison. | ||||
| If you omit /CI TextHistogram performs case-sensitive comparison unless you include /LOC. | |||||
| /DN=binsCountsWave | Specifies the numeric output wave that contains the count for each bin. If you omit /DN, the numeric output wave is created in the current data folder and named W_TextHistogram. | ||||
| /DT=binsTextWave | Specifies the text output wave that contains the strings corresponding to each bin. If you omit /DT, the text output wave is created in the current data folder and named T_TextHistogram. | ||||
| /FREE | Creates all output waves as a free waves. | ||||
| /FREE is permitted in user-defined functions only. If you use /FREE then all output wave parameters must be simple names, not paths or $ expressions. | |||||
| See Free Waves for details on free waves. | |||||
| /LOC | Performs case-insensitive string comparison following locale-aware rules. This option results in significantly slower performance. | ||||
| /SORT=mode | Sets the order of the output bins. | ||||
| |||||
| /Z | Suppress errors. You can use V_Flag to detect and handle errors yourself. | ||||
Details
TextHistogram does case-sensitive string comparisons unless you specify /CI or /LOC in which case it does case-insensitive string comparisons.
TextHistogram scans srcTextWave and counts matching string entries. It treats text waves of all dimensions as if they were 1D waves.
The output of the operation consists of two waves: a text wave containing the text corresponding to each bin and a numeric wave containing the bin counts. You can specify the destination waves using the /DT and /DN flags. If you omit /DT the text output wave is created in the current data folder and named T_TextHistogram. If you omit /DN the numeric output wave is created in the current data folder and named W_TextHistogram. The output waves overwrite any previously-existiing waves with the same names.
The operation creates automatic wave references for the output waves specified by /DT and /DN. See Automatic Creation of Wave References for details. It does not create wave references for the default output waves created if you omit /DT or /DN so you need explicit wave references.
When using case-insensitive mode the output text wave may use any one of the equivalent forms of the text represented by the bin.
Output Variables
TextHistogram sets the following output variable:
| V_flag | 0 if the operation succeeded or a non-zero error code. | |