Data Society – Home › 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 7:02 pm EDT
#18112

Keymaster
Hi JayC,
I just ran the code
NBA = read.csv(“NBA.csv”)
clust_data_NBA = NBA[, c(“MPG”, “PPG”, “FG_PC”, “X3P_PC”,
“FT_PC”, “RPG”, “APG”, “STPG”, “BLKPG”)]
I also ran the slide from the code (as copied below):
clust_data_NBA = NBA[, c(“MPG”, “FG_PC”, “X3P_PC”, “FT_PC”,
“APG”, “PPG”, “STPG”, “BLKPG”)]
Both of these variations worked when I ran them. I recommend restarting R and RStudio, as this tends to solve problems like this, where the code does not seem to be working correctly.
Let me know if that worked!
Best,
Merav