0
$\begingroup$

I have a large dataset and I would like to convert these categorical data into numeric in binary form to perform k means clustering in R. However, I get an error in value. This is the formula that I have entered into the excel sheet: =LEFT(B2,FIND(" ",B2,1)-1).

This is my dataset.

enter image description here

$\endgroup$
1
$\begingroup$

Why don't you import the data into R and use some built-in function for encoding? createDummyFeatures from mlr package is a function, which can do one-hot encoding of categorical variables.

https://www.rdocumentation.org/packages/mlr/versions/2.13/topics/createDummyFeatures

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.