mpone {dae} | R Documentation |
Converts the first two levels of a factor into the numeric values -1 and +1.
mpone(factor)
factor |
The factor to be converted. |
A numeric vector.
If the factor has more than two levels they will be coerced to numeric values.
mp <- c("-", "+") C <- factor(mpone(A)*mpone(B), labels = mp)