How To Perform One Hot Encoding In R