Catindex-func
Returns the category index for each element of a categorical column, to a worksheet column.
vector Catindex(vector vd)
vd
Returns the category index for each element of a categorical column vd.
// 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 col(H)=catindex(col(B));
Category, Catrows, Cattext