code: public static Vec categoricalDomainsToNumeric(final Vec src) {
      if( !src.isCategorical() ) throw new H2OIllegalArgumentException("categoricalToNumeric() conversion only works on categorical columns");
      // check if the 1st lvl of the domain can be parsed as int
      return new MRTask() {
          @Override public void map(Chunk c) {
            for (int i=0;i<c._len;++i)
              if( !c.isNA(i) )
                c.set(i, Integer.parseInt(src.domain()[(int)c.at8(i)]));
          }
        }.doAll(Vec.T_NUM, src).outputFrame().anyVec();
    }
docs: Create a new {@link Vec} of numeric values from a categorical {@link Vec}.
  
  Numeric values are generated explicitly from the domain values, and not the
  enumeration levels. If a domain value cannot be translated as a number, that
  domain and all values for that domain will be NA.
  
  @param src a categorical {@link Vec}
  @return a numeric {@link Vec}