Cattext-func
Returns the nth category value of a Categorical column, to a worksheet column. It is the reverse function of Catindex.
vector Cattext(int n, vector vd)$
vd
Returns the nth category value of a categorical column vd.
EX1
//fill col(A) with "q q q w e", and set as categorical cattext(3, col(A))$=;//e
EX2
// create an empty book newbook; // import the file automobile.dat into the new book impASC fname:="C:\Program Files\OriginLab\Origin2020b\Samples\Statistics\automobile.dat"; // set column 2 as categorical and sort it in ascending order wks.col2.categorical.type=2; wks.col2.categorical.sort=1; // add a new column H and use catindex function to fill it with the corresponding category index of element in column A // add a new column I and use cattext function to get the category string from index in column H col(H)=catindex(col(B)); col(I)=cattext(col(H), col(B))$;
Category, Catindex, Catrows