Forum Replies Created
- 
		AuthorPosts
 - 
		
			
				
October 10, 2016 at 10:33 pm EDT in reply to: Slide 106 causes "undefined columns selected" error #18232
JayC
ParticipantAlso, for some reason my code is spitting out that the best number of clusters is 3, not 2.
October 10, 2016 at 10:22 pm EDT in reply to: Slide 106 causes "undefined columns selected" error #18231JayC
ParticipantSo the restart didn’t work, and neither did the copy/paste of your code into my code.
But I basically rebuilt the entire expression one variable at a time and for some mysterious reason it worked.
Weird are the ways of R.
October 9, 2016 at 6:42 pm EDT in reply to: Slide 106 causes "undefined columns selected" error #18110JayC
ParticipantThe 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.
JayC
ParticipantI figured out the wrap function (I think). The call looks something like this:
ggpairs(NBA.viz,
lower = list(continuous = wrap(“smooth”, color = “orange”)),
diag = list(continuous = wrap(“barDiag”, color = “blue”)))which creates orange and blue bars.
JayC
ParticipantThank you – resolved.
 - 
		AuthorPosts
 
