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

#18110
JayC
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.