Front Page › Forums › Clustering and finding patterns › Slide 106 causes "undefined columns selected" error › Reply To: Slide 106 causes "undefined columns selected" error
October 9, 2016 at 6:42 pm EDT
#18110
Participant
The colnames command produces:
> colnames(NBA)
[1] “NAME” “TEAM” “SALARY.M.” “GP” “MPG”
[6] “PPG” “FG_PC” “X3P_PC” “FT_PC” “RPG”
[11] “APG” “STPG” “BLKPG” “POSITION”
Note that the file NBA.csv has a column titled “3P_PC”, and R doesn’t allow columns to start with a number (so it adds the “X”). This was covered in the data viz course I believe.
My point is that the code on your slide does not work and I do not understand why.