ã INPUT/OUTPUT SCRIPT $stop 1 ã Read file as a vector (developer's function) read {file} : { if (0>sûsys.filesize{file}) ÙÂ'read failed: ',îs; aûsÒ' '; fdûsys.open{file;`O_RDONLY;0}; sys.read{fd;a;s}; sys.close{fd}; a } ã Replace character values by numerical ã vec- given data vector ã x & y - nested vectors of character and numerical values accordingly replace {vec;x;y} : { â¡(<'vecû_nsr{vec;'''),¡x,¡(<''';'''),¡y,¡<'''}'; vec } ã Main function for input ã ã file - character string containing file name and path ã var - variable name (character string) ã ccol - number of target column, maybe 'none','last' or valid column number ã ã Replace function is to use as follows (instead vec maybe sizeY or class): ã ã[error] : stop ã * vecûreplace {vec;('x1';'xn');('y1';'yn')} ã * û ã Sign '-' is replaced by high minus '¢' ã Target column's items after conversion are 1 and ¢1 input {file;var;ccol} : { vecûread {file}; ((lineûvecÅ`char©13)/vec)û' '; sizeYû1++/','=(lineÉ1)Ùvec; if ((Òline)=lineÉ1) {^Õ'Please,input number of columns in sizeY'}; while (15=0Ødo (âvec)) { ^Õ'Please, use replace function again' }; vecû_ssr{vec;'-';'¢'}; vecûâvec; matû(((Òvec)ßsizeY),sizeY)Òvec; if (~ccol½'none') { â(ccol½'last')/'ccolûîsizeY-1'; classûîmat[;âccol]; if (0=^/1 ¢1Åâclass) {^Õ'Use replace function for target column'}; mat[;âccol]ûâclass }; âvar,'ûmat'; â'Ò',var }