Displaying 1 result from an estimated 1 matches for "nba2".
Did you mean:
nb2
2012 Apr 26
1
Heatmap fidelity
...######################################
# Get data
nba <- read.csv("http://datasets.flowingdata.com/ppg2008.csv", sep=",")
# Reorder
nba <- nba[order(nba$PTS),]
# Name the rows and then eliminate the 1st row
row.names(nba) <- nba$Name
nba <- nba[,2:20]
# nba2 <- nba[1:10,] ## use these if you only want to look @ 10 players
# Compute how "similar" players are by doing a correlation between their
statistical sets
psim = cor(t(nba))
# psim2 = cor(t(nba2))
# Note: everyone has a self-correlation of 1
diag(abs(psim))
# diag(abs(psim2...