makeX function

convert a data frame to a data matrix with one-hot encoding