Reply To: Slide 106 causes "undefined columns selected" error

Data Society – Home Forums Clustering and finding patterns Slide 106 causes "undefined columns selected" error Reply To: Slide 106 causes "undefined columns selected" error

#18107

Hi JayC,

Thanks for your comment! Usually this error “undefined columns selected” means that your code is trying to access a column that doesn’t exist. It looks like your code has a column “X3P_PC”, and the error message has a column name “3P_PC”. I recommend to recheck your column names, as it may be that there is a typo in one of them. You can always use the code “colnames(NBA)” to see a list of all the column names in the console and then copy and paste the names into your code.

There are some other ways to subset the columns, such as identifying the column numbers instead of names or using the subset function. You can always test those out to see if they work.

Let me know if that helps!

Best,
Merav