The numeric vector is remapped to integers from 0 to max-1, with any missing values mapped to the midpoint. Original idea from Tony Nolan. This will eventually be generalised to do the remapping using any of the rescaling functions.
rescale.by.group(x, by=NULL, type = "irank", itop = 100)
The numeric vector to rescale.
A factor of the same length as x used to define the groups.
The type of rescaling to perform.
For an integer remapping this is the number of groups, so that the numeric values are maped to the integers from 0 to (max-1).
This Rattle support function, which is also useful by itself, provides a simple mechanism to rescale a numeric variable. Several rescalings are possible. The rescaling is done by first grouping the observations according to the by argument.
Package home page: https://rattle.togaware.com