powered by
Converts a numeric variable into a binary one using a cut point
Numeric2Binary(y, name= "MyVar", cut = NULL)
A binary Variable
Vector containing the numeric values
Name of the variable
Cut point to cut the values of the variable. If is NULL the median is used.
Jose Luis Vicente-Villardon
Converts a numeric variable into a binary one using a cut point. If the cut is NULL the median is used.
Dataframe2BinaryMatrix
y=c(1, 1.2, 3.2, 2.4, 1.7, 2.2, 2.7, 3.1) Numeric2Binary(y)
Run the code above in your browser using DataLab