I got the problem to convert text variable to numeric variable. I think I successful construct the dummy variable with several levels. However, when i try to read the datafile, the categories of these variable are still text..
here is my code, output, and datafile:
after that, when I try to generate the correlation value, it still shows error:
Error in cor(hpNumeric) : 'x' must be numeric
Any suggestions are appreciated !