Ass 10 Error: # Error in eval(predvars, data, env) : object 'label' not found

Ass 10 Error: # Error in eval(predvars, data, env) : object 'label' not found

by Iciar Iturmendi Sabater -
Number of replies: 4

Hello,

I was wondering if anyone else is getting the following error when building the DT, SVM and/or kNN models for assignment 10

# Error in eval(predvars, data, env) : object 'label' not found

I have doubled check I am using the right column name when creating the formula. Would appreciate any guidance, thanks.

In reply to Iciar Iturmendi Sabater

Re: Ass 10 Error: # Error in eval(predvars, data, env) : object 'label' not found

by Erik Spence -
It works for me. You may need to convert the label column to a factor.
In reply to Erik Spence

Re: Ass 10 Error: # Error in eval(predvars, data, env) : object 'label' not found

by Micaela Wiseman -
I'm having the same issue but with: object 'area' not found. Do all the columns need to be converted to factors?
In reply to Micaela Wiseman

Re: Ass 10 Error: # Error in eval(predvars, data, env) : object 'label' not found

by Erik Spence -
No. Only the category column should be converted to a factor. All others should be numeric.