0

After creating dummy variables for all the categorical variables in the dataset, I'm able to view only the dummy variables and not the original factor varaibles in the new dataset .How do i get to view the original factor and dummy variables created in the same dataset ?

  • 1
    It would be easier to help you if you provided a [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input data and the desired output. – MrFlick Sep 11 '17 at 17:30
  • Apologies,i'm using the Automobile dataset from UCI repository – flyinlizard Sep 11 '17 at 17:35
  • 1
    Please show all the code you've run so far on the Automobile data set. Also, in terms of creating dummy variables, R takes care of this for you automatically in most modeling functions (such as `lm` or `glm`). Or you can use the `model.matrix` function to generate the dummy variables for a given model formula. – eipi10 Sep 11 '17 at 21:52

0 Answers0