R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

summary(cars)
##      speed           dist       
##  Min.   : 4.0   Min.   :  2.00  
##  1st Qu.:12.0   1st Qu.: 26.00  
##  Median :15.0   Median : 36.00  
##  Mean   :15.4   Mean   : 42.98  
##  3rd Qu.:19.0   3rd Qu.: 56.00  
##  Max.   :25.0   Max.   :120.00

Including Plots

You can also embed plots, for example:

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.

nba <- read.csv("http://datasets.flowingdata.com/ppg2008.csv", sep=",")
nba
##                  Name  G  MIN  PTS  FGM  FGA   FGP FTM  FTA   FTP X3PM
## 1        Dwyane Wade  79 38.6 30.2 10.8 22.0 0.491 7.5  9.8 0.765  1.1
## 2       LeBron James  81 37.7 28.4  9.7 19.9 0.489 7.3  9.4 0.780  1.6
## 3        Kobe Bryant  82 36.2 26.8  9.8 20.9 0.467 5.9  6.9 0.856  1.4
## 4      Dirk Nowitzki  81 37.7 25.9  9.6 20.0 0.479 6.0  6.7 0.890  0.8
## 5      Danny Granger  67 36.2 25.8  8.5 19.1 0.447 6.0  6.9 0.878  2.7
## 6       Kevin Durant  74 39.0 25.3  8.9 18.8 0.476 6.1  7.1 0.863  1.3
## 7       Kevin Martin  51 38.2 24.6  6.7 15.9 0.420 9.0 10.3 0.867  2.3
## 8       Al Jefferson  50 36.6 23.1  9.7 19.5 0.497 3.7  5.0 0.738  0.0
## 9         Chris Paul  78 38.5 22.8  8.1 16.1 0.503 5.8  6.7 0.868  0.8
## 10   Carmelo Anthony  66 34.5 22.8  8.1 18.3 0.443 5.6  7.1 0.793  1.0
## 11        Chris Bosh  77 38.1 22.7  8.0 16.4 0.487 6.5  8.0 0.817  0.2
## 12       Brandon Roy  78 37.2 22.6  8.1 16.9 0.480 5.3  6.5 0.824  1.1
## 13    Antawn Jamison  81 38.2 22.2  8.3 17.8 0.468 4.2  5.6 0.754  1.4
## 14       Tony Parker  72 34.1 22.0  8.9 17.5 0.506 3.9  5.0 0.782  0.3
## 15  Amare Stoudemire  53 36.8 21.4  7.6 14.1 0.539 6.1  7.3 0.835  0.1
## 16       Joe Johnson  79 39.5 21.4  7.8 18.0 0.437 3.8  4.6 0.826  1.9
## 17      Devin Harris  69 36.1 21.3  6.6 15.1 0.438 7.2  8.8 0.820  0.9
## 18      Michael Redd  33 36.4 21.2  7.5 16.6 0.455 4.0  4.9 0.814  2.1
## 19        David West  76 39.3 21.0  8.0 17.0 0.472 4.8  5.5 0.884  0.1
## 20  Zachary Randolph  50 35.1 20.8  8.3 17.5 0.475 3.6  4.9 0.734  0.6
## 21      Caron Butler  67 38.6 20.8  7.3 16.2 0.453 5.1  6.0 0.858  1.0
## 22      Vince Carter  80 36.8 20.8  7.4 16.8 0.437 4.2  5.1 0.817  1.9
## 23   Stephen Jackson  59 39.7 20.7  7.0 16.9 0.414 5.0  6.0 0.826  1.7
## 24        Ben Gordon  82 36.6 20.7  7.3 16.0 0.455 4.0  4.7 0.864  2.1
## 25     Dwight Howard  79 35.7 20.6  7.1 12.4 0.572 6.4 10.7 0.594  0.0
## 26       Paul Pierce  81 37.4 20.5  6.7 14.6 0.457 5.7  6.8 0.830  1.5
## 27     Al Harrington  73 34.9 20.1  7.3 16.6 0.439 3.2  4.0 0.793  2.3
## 28    Jamal Crawford  65 38.1 19.7  6.4 15.7 0.410 4.6  5.3 0.872  2.2
## 29          Yao Ming  77 33.6 19.7  7.4 13.4 0.548 4.9  5.7 0.866  0.0
## 30 Richard Jefferson  82 35.9 19.6  6.5 14.9 0.439 5.1  6.3 0.805  1.4
## 31       Jason Terry  74 33.6 19.6  7.3 15.8 0.463 2.7  3.0 0.880  2.3
## 32    Deron Williams  68 36.9 19.4  6.8 14.5 0.471 4.8  5.6 0.849  1.0
## 33        Tim Duncan  75 33.7 19.3  7.4 14.8 0.504 4.5  6.4 0.692  0.0
## 34       Monta Ellis  25 35.6 19.0  7.8 17.2 0.451 3.1  3.8 0.830  0.3
## 35          Rudy Gay  79 37.3 18.9  7.2 16.0 0.453 3.3  4.4 0.767  1.1
## 36         Pau Gasol  81 37.1 18.9  7.3 12.9 0.567 4.2  5.4 0.781  0.0
## 37    Andre Iguodala  82 39.8 18.8  6.6 14.0 0.473 4.6  6.4 0.724  1.0
## 38    Corey Maggette  51 31.1 18.6  5.7 12.4 0.461 6.7  8.1 0.824  0.5
## 39         O.J. Mayo  82 38.0 18.5  6.9 15.6 0.438 3.0  3.4 0.879  1.8
## 40      John Salmons  79 37.5 18.3  6.5 13.8 0.472 3.6  4.4 0.830  1.6
## 41  Richard Hamilton  67 34.0 18.3  7.0 15.6 0.447 3.3  3.9 0.848  1.0
## 42         Ray Allen  79 36.3 18.2  6.3 13.2 0.480 3.0  3.2 0.952  2.5
## 43 LaMarcus Aldridge  81 37.1 18.1  7.4 15.3 0.484 3.2  4.1 0.781  0.1
## 44       Josh Howard  52 31.9 18.0  6.8 15.1 0.451 3.3  4.2 0.782  1.1
## 45  Maurice Williams  81 35.0 17.8  6.5 13.9 0.467 2.6  2.8 0.912  2.3
## 46  Shaquille O'neal  75 30.1 17.8  6.8 11.2 0.609 4.1  6.9 0.595  0.0
## 47     Rashard Lewis  79 36.2 17.7  6.1 13.8 0.439 2.8  3.4 0.836  2.8
## 48  Chauncey Billups  79 35.3 17.7  5.2 12.4 0.418 5.3  5.8 0.913  2.1
## 49     Allen Iverson  57 36.7 17.5  6.1 14.6 0.417 4.8  6.1 0.781  0.5
## 50     Nate Robinson  74 29.9 17.2  6.1 13.9 0.437 3.4  4.0 0.841  1.7
##    X3PA  X3PP ORB DRB  TRB  AST STL BLK  TO  PF
## 1   3.5 0.317 1.1 3.9  5.0  7.5 2.2 1.3 3.4 2.3
## 2   4.7 0.344 1.3 6.3  7.6  7.2 1.7 1.1 3.0 1.7
## 3   4.1 0.351 1.1 4.1  5.2  4.9 1.5 0.5 2.6 2.3
## 4   2.1 0.359 1.1 7.3  8.4  2.4 0.8 0.8 1.9 2.2
## 5   6.7 0.404 0.7 4.4  5.1  2.7 1.0 1.4 2.5 3.1
## 6   3.1 0.422 1.0 5.5  6.5  2.8 1.3 0.7 3.0 1.8
## 7   5.4 0.415 0.6 3.0  3.6  2.7 1.2 0.2 2.9 2.3
## 8   0.1 0.000 3.4 7.5 11.0  1.6 0.8 1.7 1.8 2.8
## 9   2.3 0.364 0.9 4.7  5.5 11.0 2.8 0.1 3.0 2.7
## 10  2.6 0.371 1.6 5.2  6.8  3.4 1.1 0.4 3.0 3.0
## 11  0.6 0.245 2.8 7.2 10.0  2.5 0.9 1.0 2.3 2.5
## 12  2.8 0.377 1.3 3.4  4.7  5.1 1.1 0.3 1.9 1.6
## 13  3.9 0.351 2.4 6.5  8.9  1.9 1.2 0.3 1.5 2.7
## 14  0.9 0.292 0.4 2.7  3.1  6.9 0.9 0.1 2.6 1.5
## 15  0.1 0.429 2.2 5.9  8.1  2.0 0.9 1.1 2.8 3.1
## 16  5.2 0.360 0.8 3.6  4.4  5.8 1.1 0.2 2.5 2.2
## 17  3.2 0.291 0.4 2.9  3.3  6.9 1.7 0.2 3.1 2.4
## 18  5.8 0.366 0.7 2.5  3.2  2.7 1.1 0.1 1.6 1.4
## 19  0.3 0.240 2.1 6.4  8.5  2.3 0.6 0.9 2.1 2.7
## 20  1.9 0.330 3.1 6.9 10.1  2.1 0.9 0.3 2.3 2.7
## 21  3.1 0.310 1.8 4.4  6.2  4.3 1.6 0.3 3.1 2.5
## 22  4.9 0.385 0.9 4.2  5.1  4.7 1.0 0.5 2.1 2.9
## 23  5.2 0.338 1.2 3.9  5.1  6.5 1.5 0.5 3.9 2.6
## 24  5.1 0.410 0.6 2.8  3.5  3.4 0.9 0.3 2.4 2.2
## 25  0.0 0.000 4.3 9.6 13.8  1.4 1.0 2.9 3.0 3.4
## 26  3.8 0.391 0.7 5.0  5.6  3.6 1.0 0.3 2.8 2.7
## 27  6.4 0.364 1.4 4.9  6.2  1.4 1.2 0.3 2.2 3.1
## 28  6.1 0.360 0.4 2.6  3.0  4.4 0.9 0.2 2.3 1.4
## 29  0.0 1.000 2.6 7.2  9.9  1.8 0.4 1.9 3.0 3.3
## 30  3.6 0.397 0.7 3.9  4.6  2.4 0.8 0.2 2.0 3.1
## 31  6.2 0.366 0.5 1.9  2.4  3.4 1.3 0.3 1.6 1.9
## 32  3.3 0.310 0.4 2.5  2.9 10.7 1.1 0.3 3.4 2.0
## 33  0.0 0.000 2.7 8.0 10.7  3.5 0.5 1.7 2.2 2.3
## 34  1.0 0.308 0.6 3.8  4.3  3.7 1.6 0.3 2.7 2.7
## 35  3.1 0.351 1.4 4.2  5.5  1.7 1.2 0.7 2.6 2.8
## 36  0.0 0.500 3.2 6.4  9.6  3.5 0.6 1.0 1.9 2.1
## 37  3.2 0.307 1.1 4.6  5.7  5.3 1.6 0.4 2.7 1.9
## 38  1.9 0.253 1.0 4.6  5.5  1.8 0.9 0.2 2.4 3.8
## 39  4.6 0.384 0.7 3.1  3.8  3.2 1.1 0.2 2.8 2.5
## 40  3.8 0.417 0.7 3.5  4.2  3.2 1.1 0.3 2.1 2.3
## 41  2.8 0.368 0.7 2.4  3.1  4.4 0.6 0.1 2.0 2.6
## 42  6.2 0.409 0.8 2.7  3.5  2.8 0.9 0.2 1.7 2.0
## 43  0.3 0.250 2.9 4.6  7.5  1.9 1.0 1.0 1.5 2.6
## 44  3.2 0.345 1.1 3.9  5.1  1.6 1.1 0.6 1.7 2.6
## 45  5.2 0.436 0.6 2.9  3.4  4.1 0.9 0.1 2.2 2.7
## 46  0.0 0.000 2.5 5.9  8.4  1.7 0.7 1.4 2.2 3.4
## 47  7.0 0.397 1.2 4.6  5.7  2.6 1.0 0.6 2.0 2.5
## 48  5.0 0.408 0.4 2.6  3.0  6.4 1.2 0.2 2.2 2.0
## 49  1.7 0.283 0.5 2.5  3.0  5.0 1.5 0.1 2.6 1.5
## 50  5.2 0.325 1.3 2.6  3.9  4.1 1.3 0.1 1.9 2.8
nba <- nba[order(nba$PTS),]
nba
##                  Name  G  MIN  PTS  FGM  FGA   FGP FTM  FTA   FTP X3PM
## 50     Nate Robinson  74 29.9 17.2  6.1 13.9 0.437 3.4  4.0 0.841  1.7
## 49     Allen Iverson  57 36.7 17.5  6.1 14.6 0.417 4.8  6.1 0.781  0.5
## 47     Rashard Lewis  79 36.2 17.7  6.1 13.8 0.439 2.8  3.4 0.836  2.8
## 48  Chauncey Billups  79 35.3 17.7  5.2 12.4 0.418 5.3  5.8 0.913  2.1
## 45  Maurice Williams  81 35.0 17.8  6.5 13.9 0.467 2.6  2.8 0.912  2.3
## 46  Shaquille O'neal  75 30.1 17.8  6.8 11.2 0.609 4.1  6.9 0.595  0.0
## 44       Josh Howard  52 31.9 18.0  6.8 15.1 0.451 3.3  4.2 0.782  1.1
## 43 LaMarcus Aldridge  81 37.1 18.1  7.4 15.3 0.484 3.2  4.1 0.781  0.1
## 42         Ray Allen  79 36.3 18.2  6.3 13.2 0.480 3.0  3.2 0.952  2.5
## 40      John Salmons  79 37.5 18.3  6.5 13.8 0.472 3.6  4.4 0.830  1.6
## 41  Richard Hamilton  67 34.0 18.3  7.0 15.6 0.447 3.3  3.9 0.848  1.0
## 39         O.J. Mayo  82 38.0 18.5  6.9 15.6 0.438 3.0  3.4 0.879  1.8
## 38    Corey Maggette  51 31.1 18.6  5.7 12.4 0.461 6.7  8.1 0.824  0.5
## 37    Andre Iguodala  82 39.8 18.8  6.6 14.0 0.473 4.6  6.4 0.724  1.0
## 35          Rudy Gay  79 37.3 18.9  7.2 16.0 0.453 3.3  4.4 0.767  1.1
## 36         Pau Gasol  81 37.1 18.9  7.3 12.9 0.567 4.2  5.4 0.781  0.0
## 34       Monta Ellis  25 35.6 19.0  7.8 17.2 0.451 3.1  3.8 0.830  0.3
## 33        Tim Duncan  75 33.7 19.3  7.4 14.8 0.504 4.5  6.4 0.692  0.0
## 32    Deron Williams  68 36.9 19.4  6.8 14.5 0.471 4.8  5.6 0.849  1.0
## 30 Richard Jefferson  82 35.9 19.6  6.5 14.9 0.439 5.1  6.3 0.805  1.4
## 31       Jason Terry  74 33.6 19.6  7.3 15.8 0.463 2.7  3.0 0.880  2.3
## 28    Jamal Crawford  65 38.1 19.7  6.4 15.7 0.410 4.6  5.3 0.872  2.2
## 29          Yao Ming  77 33.6 19.7  7.4 13.4 0.548 4.9  5.7 0.866  0.0
## 27     Al Harrington  73 34.9 20.1  7.3 16.6 0.439 3.2  4.0 0.793  2.3
## 26       Paul Pierce  81 37.4 20.5  6.7 14.6 0.457 5.7  6.8 0.830  1.5
## 25     Dwight Howard  79 35.7 20.6  7.1 12.4 0.572 6.4 10.7 0.594  0.0
## 23   Stephen Jackson  59 39.7 20.7  7.0 16.9 0.414 5.0  6.0 0.826  1.7
## 24        Ben Gordon  82 36.6 20.7  7.3 16.0 0.455 4.0  4.7 0.864  2.1
## 20  Zachary Randolph  50 35.1 20.8  8.3 17.5 0.475 3.6  4.9 0.734  0.6
## 21      Caron Butler  67 38.6 20.8  7.3 16.2 0.453 5.1  6.0 0.858  1.0
## 22      Vince Carter  80 36.8 20.8  7.4 16.8 0.437 4.2  5.1 0.817  1.9
## 19        David West  76 39.3 21.0  8.0 17.0 0.472 4.8  5.5 0.884  0.1
## 18      Michael Redd  33 36.4 21.2  7.5 16.6 0.455 4.0  4.9 0.814  2.1
## 17      Devin Harris  69 36.1 21.3  6.6 15.1 0.438 7.2  8.8 0.820  0.9
## 15  Amare Stoudemire  53 36.8 21.4  7.6 14.1 0.539 6.1  7.3 0.835  0.1
## 16       Joe Johnson  79 39.5 21.4  7.8 18.0 0.437 3.8  4.6 0.826  1.9
## 14       Tony Parker  72 34.1 22.0  8.9 17.5 0.506 3.9  5.0 0.782  0.3
## 13    Antawn Jamison  81 38.2 22.2  8.3 17.8 0.468 4.2  5.6 0.754  1.4
## 12       Brandon Roy  78 37.2 22.6  8.1 16.9 0.480 5.3  6.5 0.824  1.1
## 11        Chris Bosh  77 38.1 22.7  8.0 16.4 0.487 6.5  8.0 0.817  0.2
## 9         Chris Paul  78 38.5 22.8  8.1 16.1 0.503 5.8  6.7 0.868  0.8
## 10   Carmelo Anthony  66 34.5 22.8  8.1 18.3 0.443 5.6  7.1 0.793  1.0
## 8       Al Jefferson  50 36.6 23.1  9.7 19.5 0.497 3.7  5.0 0.738  0.0
## 7       Kevin Martin  51 38.2 24.6  6.7 15.9 0.420 9.0 10.3 0.867  2.3
## 6       Kevin Durant  74 39.0 25.3  8.9 18.8 0.476 6.1  7.1 0.863  1.3
## 5      Danny Granger  67 36.2 25.8  8.5 19.1 0.447 6.0  6.9 0.878  2.7
## 4      Dirk Nowitzki  81 37.7 25.9  9.6 20.0 0.479 6.0  6.7 0.890  0.8
## 3        Kobe Bryant  82 36.2 26.8  9.8 20.9 0.467 5.9  6.9 0.856  1.4
## 2       LeBron James  81 37.7 28.4  9.7 19.9 0.489 7.3  9.4 0.780  1.6
## 1        Dwyane Wade  79 38.6 30.2 10.8 22.0 0.491 7.5  9.8 0.765  1.1
##    X3PA  X3PP ORB DRB  TRB  AST STL BLK  TO  PF
## 50  5.2 0.325 1.3 2.6  3.9  4.1 1.3 0.1 1.9 2.8
## 49  1.7 0.283 0.5 2.5  3.0  5.0 1.5 0.1 2.6 1.5
## 47  7.0 0.397 1.2 4.6  5.7  2.6 1.0 0.6 2.0 2.5
## 48  5.0 0.408 0.4 2.6  3.0  6.4 1.2 0.2 2.2 2.0
## 45  5.2 0.436 0.6 2.9  3.4  4.1 0.9 0.1 2.2 2.7
## 46  0.0 0.000 2.5 5.9  8.4  1.7 0.7 1.4 2.2 3.4
## 44  3.2 0.345 1.1 3.9  5.1  1.6 1.1 0.6 1.7 2.6
## 43  0.3 0.250 2.9 4.6  7.5  1.9 1.0 1.0 1.5 2.6
## 42  6.2 0.409 0.8 2.7  3.5  2.8 0.9 0.2 1.7 2.0
## 40  3.8 0.417 0.7 3.5  4.2  3.2 1.1 0.3 2.1 2.3
## 41  2.8 0.368 0.7 2.4  3.1  4.4 0.6 0.1 2.0 2.6
## 39  4.6 0.384 0.7 3.1  3.8  3.2 1.1 0.2 2.8 2.5
## 38  1.9 0.253 1.0 4.6  5.5  1.8 0.9 0.2 2.4 3.8
## 37  3.2 0.307 1.1 4.6  5.7  5.3 1.6 0.4 2.7 1.9
## 35  3.1 0.351 1.4 4.2  5.5  1.7 1.2 0.7 2.6 2.8
## 36  0.0 0.500 3.2 6.4  9.6  3.5 0.6 1.0 1.9 2.1
## 34  1.0 0.308 0.6 3.8  4.3  3.7 1.6 0.3 2.7 2.7
## 33  0.0 0.000 2.7 8.0 10.7  3.5 0.5 1.7 2.2 2.3
## 32  3.3 0.310 0.4 2.5  2.9 10.7 1.1 0.3 3.4 2.0
## 30  3.6 0.397 0.7 3.9  4.6  2.4 0.8 0.2 2.0 3.1
## 31  6.2 0.366 0.5 1.9  2.4  3.4 1.3 0.3 1.6 1.9
## 28  6.1 0.360 0.4 2.6  3.0  4.4 0.9 0.2 2.3 1.4
## 29  0.0 1.000 2.6 7.2  9.9  1.8 0.4 1.9 3.0 3.3
## 27  6.4 0.364 1.4 4.9  6.2  1.4 1.2 0.3 2.2 3.1
## 26  3.8 0.391 0.7 5.0  5.6  3.6 1.0 0.3 2.8 2.7
## 25  0.0 0.000 4.3 9.6 13.8  1.4 1.0 2.9 3.0 3.4
## 23  5.2 0.338 1.2 3.9  5.1  6.5 1.5 0.5 3.9 2.6
## 24  5.1 0.410 0.6 2.8  3.5  3.4 0.9 0.3 2.4 2.2
## 20  1.9 0.330 3.1 6.9 10.1  2.1 0.9 0.3 2.3 2.7
## 21  3.1 0.310 1.8 4.4  6.2  4.3 1.6 0.3 3.1 2.5
## 22  4.9 0.385 0.9 4.2  5.1  4.7 1.0 0.5 2.1 2.9
## 19  0.3 0.240 2.1 6.4  8.5  2.3 0.6 0.9 2.1 2.7
## 18  5.8 0.366 0.7 2.5  3.2  2.7 1.1 0.1 1.6 1.4
## 17  3.2 0.291 0.4 2.9  3.3  6.9 1.7 0.2 3.1 2.4
## 15  0.1 0.429 2.2 5.9  8.1  2.0 0.9 1.1 2.8 3.1
## 16  5.2 0.360 0.8 3.6  4.4  5.8 1.1 0.2 2.5 2.2
## 14  0.9 0.292 0.4 2.7  3.1  6.9 0.9 0.1 2.6 1.5
## 13  3.9 0.351 2.4 6.5  8.9  1.9 1.2 0.3 1.5 2.7
## 12  2.8 0.377 1.3 3.4  4.7  5.1 1.1 0.3 1.9 1.6
## 11  0.6 0.245 2.8 7.2 10.0  2.5 0.9 1.0 2.3 2.5
## 9   2.3 0.364 0.9 4.7  5.5 11.0 2.8 0.1 3.0 2.7
## 10  2.6 0.371 1.6 5.2  6.8  3.4 1.1 0.4 3.0 3.0
## 8   0.1 0.000 3.4 7.5 11.0  1.6 0.8 1.7 1.8 2.8
## 7   5.4 0.415 0.6 3.0  3.6  2.7 1.2 0.2 2.9 2.3
## 6   3.1 0.422 1.0 5.5  6.5  2.8 1.3 0.7 3.0 1.8
## 5   6.7 0.404 0.7 4.4  5.1  2.7 1.0 1.4 2.5 3.1
## 4   2.1 0.359 1.1 7.3  8.4  2.4 0.8 0.8 1.9 2.2
## 3   4.1 0.351 1.1 4.1  5.2  4.9 1.5 0.5 2.6 2.3
## 2   4.7 0.344 1.3 6.3  7.6  7.2 1.7 1.1 3.0 1.7
## 1   3.5 0.317 1.1 3.9  5.0  7.5 2.2 1.3 3.4 2.3
row.names(nba) <- nba$Name
nba
##                                  Name  G  MIN  PTS  FGM  FGA   FGP FTM
## Nate Robinson          Nate Robinson  74 29.9 17.2  6.1 13.9 0.437 3.4
## Allen Iverson          Allen Iverson  57 36.7 17.5  6.1 14.6 0.417 4.8
## Rashard Lewis          Rashard Lewis  79 36.2 17.7  6.1 13.8 0.439 2.8
## Chauncey Billups    Chauncey Billups  79 35.3 17.7  5.2 12.4 0.418 5.3
## Maurice Williams    Maurice Williams  81 35.0 17.8  6.5 13.9 0.467 2.6
## Shaquille O'neal    Shaquille O'neal  75 30.1 17.8  6.8 11.2 0.609 4.1
## Josh Howard              Josh Howard  52 31.9 18.0  6.8 15.1 0.451 3.3
## LaMarcus Aldridge  LaMarcus Aldridge  81 37.1 18.1  7.4 15.3 0.484 3.2
## Ray Allen                  Ray Allen  79 36.3 18.2  6.3 13.2 0.480 3.0
## John Salmons            John Salmons  79 37.5 18.3  6.5 13.8 0.472 3.6
## Richard Hamilton    Richard Hamilton  67 34.0 18.3  7.0 15.6 0.447 3.3
## O.J. Mayo                  O.J. Mayo  82 38.0 18.5  6.9 15.6 0.438 3.0
## Corey Maggette        Corey Maggette  51 31.1 18.6  5.7 12.4 0.461 6.7
## Andre Iguodala        Andre Iguodala  82 39.8 18.8  6.6 14.0 0.473 4.6
## Rudy Gay                    Rudy Gay  79 37.3 18.9  7.2 16.0 0.453 3.3
## Pau Gasol                  Pau Gasol  81 37.1 18.9  7.3 12.9 0.567 4.2
## Monta Ellis              Monta Ellis  25 35.6 19.0  7.8 17.2 0.451 3.1
## Tim Duncan                Tim Duncan  75 33.7 19.3  7.4 14.8 0.504 4.5
## Deron Williams        Deron Williams  68 36.9 19.4  6.8 14.5 0.471 4.8
## Richard Jefferson  Richard Jefferson  82 35.9 19.6  6.5 14.9 0.439 5.1
## Jason Terry              Jason Terry  74 33.6 19.6  7.3 15.8 0.463 2.7
## Jamal Crawford        Jamal Crawford  65 38.1 19.7  6.4 15.7 0.410 4.6
## Yao Ming                    Yao Ming  77 33.6 19.7  7.4 13.4 0.548 4.9
## Al Harrington          Al Harrington  73 34.9 20.1  7.3 16.6 0.439 3.2
## Paul Pierce              Paul Pierce  81 37.4 20.5  6.7 14.6 0.457 5.7
## Dwight Howard          Dwight Howard  79 35.7 20.6  7.1 12.4 0.572 6.4
## Stephen Jackson      Stephen Jackson  59 39.7 20.7  7.0 16.9 0.414 5.0
## Ben Gordon                Ben Gordon  82 36.6 20.7  7.3 16.0 0.455 4.0
## Zachary Randolph    Zachary Randolph  50 35.1 20.8  8.3 17.5 0.475 3.6
## Caron Butler            Caron Butler  67 38.6 20.8  7.3 16.2 0.453 5.1
## Vince Carter            Vince Carter  80 36.8 20.8  7.4 16.8 0.437 4.2
## David West                David West  76 39.3 21.0  8.0 17.0 0.472 4.8
## Michael Redd            Michael Redd  33 36.4 21.2  7.5 16.6 0.455 4.0
## Devin Harris            Devin Harris  69 36.1 21.3  6.6 15.1 0.438 7.2
## Amare Stoudemire    Amare Stoudemire  53 36.8 21.4  7.6 14.1 0.539 6.1
## Joe Johnson              Joe Johnson  79 39.5 21.4  7.8 18.0 0.437 3.8
## Tony Parker              Tony Parker  72 34.1 22.0  8.9 17.5 0.506 3.9
## Antawn Jamison        Antawn Jamison  81 38.2 22.2  8.3 17.8 0.468 4.2
## Brandon Roy              Brandon Roy  78 37.2 22.6  8.1 16.9 0.480 5.3
## Chris Bosh                Chris Bosh  77 38.1 22.7  8.0 16.4 0.487 6.5
## Chris Paul                Chris Paul  78 38.5 22.8  8.1 16.1 0.503 5.8
## Carmelo Anthony      Carmelo Anthony  66 34.5 22.8  8.1 18.3 0.443 5.6
## Al Jefferson            Al Jefferson  50 36.6 23.1  9.7 19.5 0.497 3.7
## Kevin Martin            Kevin Martin  51 38.2 24.6  6.7 15.9 0.420 9.0
## Kevin Durant            Kevin Durant  74 39.0 25.3  8.9 18.8 0.476 6.1
## Danny Granger          Danny Granger  67 36.2 25.8  8.5 19.1 0.447 6.0
## Dirk Nowitzki          Dirk Nowitzki  81 37.7 25.9  9.6 20.0 0.479 6.0
## Kobe Bryant              Kobe Bryant  82 36.2 26.8  9.8 20.9 0.467 5.9
## LeBron James            LeBron James  81 37.7 28.4  9.7 19.9 0.489 7.3
## Dwyane Wade              Dwyane Wade  79 38.6 30.2 10.8 22.0 0.491 7.5
##                     FTA   FTP X3PM X3PA  X3PP ORB DRB  TRB  AST STL BLK
## Nate Robinson       4.0 0.841  1.7  5.2 0.325 1.3 2.6  3.9  4.1 1.3 0.1
## Allen Iverson       6.1 0.781  0.5  1.7 0.283 0.5 2.5  3.0  5.0 1.5 0.1
## Rashard Lewis       3.4 0.836  2.8  7.0 0.397 1.2 4.6  5.7  2.6 1.0 0.6
## Chauncey Billups    5.8 0.913  2.1  5.0 0.408 0.4 2.6  3.0  6.4 1.2 0.2
## Maurice Williams    2.8 0.912  2.3  5.2 0.436 0.6 2.9  3.4  4.1 0.9 0.1
## Shaquille O'neal    6.9 0.595  0.0  0.0 0.000 2.5 5.9  8.4  1.7 0.7 1.4
## Josh Howard         4.2 0.782  1.1  3.2 0.345 1.1 3.9  5.1  1.6 1.1 0.6
## LaMarcus Aldridge   4.1 0.781  0.1  0.3 0.250 2.9 4.6  7.5  1.9 1.0 1.0
## Ray Allen           3.2 0.952  2.5  6.2 0.409 0.8 2.7  3.5  2.8 0.9 0.2
## John Salmons        4.4 0.830  1.6  3.8 0.417 0.7 3.5  4.2  3.2 1.1 0.3
## Richard Hamilton    3.9 0.848  1.0  2.8 0.368 0.7 2.4  3.1  4.4 0.6 0.1
## O.J. Mayo           3.4 0.879  1.8  4.6 0.384 0.7 3.1  3.8  3.2 1.1 0.2
## Corey Maggette      8.1 0.824  0.5  1.9 0.253 1.0 4.6  5.5  1.8 0.9 0.2
## Andre Iguodala      6.4 0.724  1.0  3.2 0.307 1.1 4.6  5.7  5.3 1.6 0.4
## Rudy Gay            4.4 0.767  1.1  3.1 0.351 1.4 4.2  5.5  1.7 1.2 0.7
## Pau Gasol           5.4 0.781  0.0  0.0 0.500 3.2 6.4  9.6  3.5 0.6 1.0
## Monta Ellis         3.8 0.830  0.3  1.0 0.308 0.6 3.8  4.3  3.7 1.6 0.3
## Tim Duncan          6.4 0.692  0.0  0.0 0.000 2.7 8.0 10.7  3.5 0.5 1.7
## Deron Williams      5.6 0.849  1.0  3.3 0.310 0.4 2.5  2.9 10.7 1.1 0.3
## Richard Jefferson   6.3 0.805  1.4  3.6 0.397 0.7 3.9  4.6  2.4 0.8 0.2
## Jason Terry         3.0 0.880  2.3  6.2 0.366 0.5 1.9  2.4  3.4 1.3 0.3
## Jamal Crawford      5.3 0.872  2.2  6.1 0.360 0.4 2.6  3.0  4.4 0.9 0.2
## Yao Ming            5.7 0.866  0.0  0.0 1.000 2.6 7.2  9.9  1.8 0.4 1.9
## Al Harrington       4.0 0.793  2.3  6.4 0.364 1.4 4.9  6.2  1.4 1.2 0.3
## Paul Pierce         6.8 0.830  1.5  3.8 0.391 0.7 5.0  5.6  3.6 1.0 0.3
## Dwight Howard      10.7 0.594  0.0  0.0 0.000 4.3 9.6 13.8  1.4 1.0 2.9
## Stephen Jackson     6.0 0.826  1.7  5.2 0.338 1.2 3.9  5.1  6.5 1.5 0.5
## Ben Gordon          4.7 0.864  2.1  5.1 0.410 0.6 2.8  3.5  3.4 0.9 0.3
## Zachary Randolph    4.9 0.734  0.6  1.9 0.330 3.1 6.9 10.1  2.1 0.9 0.3
## Caron Butler        6.0 0.858  1.0  3.1 0.310 1.8 4.4  6.2  4.3 1.6 0.3
## Vince Carter        5.1 0.817  1.9  4.9 0.385 0.9 4.2  5.1  4.7 1.0 0.5
## David West          5.5 0.884  0.1  0.3 0.240 2.1 6.4  8.5  2.3 0.6 0.9
## Michael Redd        4.9 0.814  2.1  5.8 0.366 0.7 2.5  3.2  2.7 1.1 0.1
## Devin Harris        8.8 0.820  0.9  3.2 0.291 0.4 2.9  3.3  6.9 1.7 0.2
## Amare Stoudemire    7.3 0.835  0.1  0.1 0.429 2.2 5.9  8.1  2.0 0.9 1.1
## Joe Johnson         4.6 0.826  1.9  5.2 0.360 0.8 3.6  4.4  5.8 1.1 0.2
## Tony Parker         5.0 0.782  0.3  0.9 0.292 0.4 2.7  3.1  6.9 0.9 0.1
## Antawn Jamison      5.6 0.754  1.4  3.9 0.351 2.4 6.5  8.9  1.9 1.2 0.3
## Brandon Roy         6.5 0.824  1.1  2.8 0.377 1.3 3.4  4.7  5.1 1.1 0.3
## Chris Bosh          8.0 0.817  0.2  0.6 0.245 2.8 7.2 10.0  2.5 0.9 1.0
## Chris Paul          6.7 0.868  0.8  2.3 0.364 0.9 4.7  5.5 11.0 2.8 0.1
## Carmelo Anthony     7.1 0.793  1.0  2.6 0.371 1.6 5.2  6.8  3.4 1.1 0.4
## Al Jefferson        5.0 0.738  0.0  0.1 0.000 3.4 7.5 11.0  1.6 0.8 1.7
## Kevin Martin       10.3 0.867  2.3  5.4 0.415 0.6 3.0  3.6  2.7 1.2 0.2
## Kevin Durant        7.1 0.863  1.3  3.1 0.422 1.0 5.5  6.5  2.8 1.3 0.7
## Danny Granger       6.9 0.878  2.7  6.7 0.404 0.7 4.4  5.1  2.7 1.0 1.4
## Dirk Nowitzki       6.7 0.890  0.8  2.1 0.359 1.1 7.3  8.4  2.4 0.8 0.8
## Kobe Bryant         6.9 0.856  1.4  4.1 0.351 1.1 4.1  5.2  4.9 1.5 0.5
## LeBron James        9.4 0.780  1.6  4.7 0.344 1.3 6.3  7.6  7.2 1.7 1.1
## Dwyane Wade         9.8 0.765  1.1  3.5 0.317 1.1 3.9  5.0  7.5 2.2 1.3
##                     TO  PF
## Nate Robinson      1.9 2.8
## Allen Iverson      2.6 1.5
## Rashard Lewis      2.0 2.5
## Chauncey Billups   2.2 2.0
## Maurice Williams   2.2 2.7
## Shaquille O'neal   2.2 3.4
## Josh Howard        1.7 2.6
## LaMarcus Aldridge  1.5 2.6
## Ray Allen          1.7 2.0
## John Salmons       2.1 2.3
## Richard Hamilton   2.0 2.6
## O.J. Mayo          2.8 2.5
## Corey Maggette     2.4 3.8
## Andre Iguodala     2.7 1.9
## Rudy Gay           2.6 2.8
## Pau Gasol          1.9 2.1
## Monta Ellis        2.7 2.7
## Tim Duncan         2.2 2.3
## Deron Williams     3.4 2.0
## Richard Jefferson  2.0 3.1
## Jason Terry        1.6 1.9
## Jamal Crawford     2.3 1.4
## Yao Ming           3.0 3.3
## Al Harrington      2.2 3.1
## Paul Pierce        2.8 2.7
## Dwight Howard      3.0 3.4
## Stephen Jackson    3.9 2.6
## Ben Gordon         2.4 2.2
## Zachary Randolph   2.3 2.7
## Caron Butler       3.1 2.5
## Vince Carter       2.1 2.9
## David West         2.1 2.7
## Michael Redd       1.6 1.4
## Devin Harris       3.1 2.4
## Amare Stoudemire   2.8 3.1
## Joe Johnson        2.5 2.2
## Tony Parker        2.6 1.5
## Antawn Jamison     1.5 2.7
## Brandon Roy        1.9 1.6
## Chris Bosh         2.3 2.5
## Chris Paul         3.0 2.7
## Carmelo Anthony    3.0 3.0
## Al Jefferson       1.8 2.8
## Kevin Martin       2.9 2.3
## Kevin Durant       3.0 1.8
## Danny Granger      2.5 3.1
## Dirk Nowitzki      1.9 2.2
## Kobe Bryant        2.6 2.3
## LeBron James       3.0 1.7
## Dwyane Wade        3.4 2.3
nba <- nba[,2:20]
nba_matrix <- data.matrix(nba)
nba
##                     G  MIN  PTS  FGM  FGA   FGP FTM  FTA   FTP X3PM X3PA
## Nate Robinson      74 29.9 17.2  6.1 13.9 0.437 3.4  4.0 0.841  1.7  5.2
## Allen Iverson      57 36.7 17.5  6.1 14.6 0.417 4.8  6.1 0.781  0.5  1.7
## Rashard Lewis      79 36.2 17.7  6.1 13.8 0.439 2.8  3.4 0.836  2.8  7.0
## Chauncey Billups   79 35.3 17.7  5.2 12.4 0.418 5.3  5.8 0.913  2.1  5.0
## Maurice Williams   81 35.0 17.8  6.5 13.9 0.467 2.6  2.8 0.912  2.3  5.2
## Shaquille O'neal   75 30.1 17.8  6.8 11.2 0.609 4.1  6.9 0.595  0.0  0.0
## Josh Howard        52 31.9 18.0  6.8 15.1 0.451 3.3  4.2 0.782  1.1  3.2
## LaMarcus Aldridge  81 37.1 18.1  7.4 15.3 0.484 3.2  4.1 0.781  0.1  0.3
## Ray Allen          79 36.3 18.2  6.3 13.2 0.480 3.0  3.2 0.952  2.5  6.2
## John Salmons       79 37.5 18.3  6.5 13.8 0.472 3.6  4.4 0.830  1.6  3.8
## Richard Hamilton   67 34.0 18.3  7.0 15.6 0.447 3.3  3.9 0.848  1.0  2.8
## O.J. Mayo          82 38.0 18.5  6.9 15.6 0.438 3.0  3.4 0.879  1.8  4.6
## Corey Maggette     51 31.1 18.6  5.7 12.4 0.461 6.7  8.1 0.824  0.5  1.9
## Andre Iguodala     82 39.8 18.8  6.6 14.0 0.473 4.6  6.4 0.724  1.0  3.2
## Rudy Gay           79 37.3 18.9  7.2 16.0 0.453 3.3  4.4 0.767  1.1  3.1
## Pau Gasol          81 37.1 18.9  7.3 12.9 0.567 4.2  5.4 0.781  0.0  0.0
## Monta Ellis        25 35.6 19.0  7.8 17.2 0.451 3.1  3.8 0.830  0.3  1.0
## Tim Duncan         75 33.7 19.3  7.4 14.8 0.504 4.5  6.4 0.692  0.0  0.0
## Deron Williams     68 36.9 19.4  6.8 14.5 0.471 4.8  5.6 0.849  1.0  3.3
## Richard Jefferson  82 35.9 19.6  6.5 14.9 0.439 5.1  6.3 0.805  1.4  3.6
## Jason Terry        74 33.6 19.6  7.3 15.8 0.463 2.7  3.0 0.880  2.3  6.2
## Jamal Crawford     65 38.1 19.7  6.4 15.7 0.410 4.6  5.3 0.872  2.2  6.1
## Yao Ming           77 33.6 19.7  7.4 13.4 0.548 4.9  5.7 0.866  0.0  0.0
## Al Harrington      73 34.9 20.1  7.3 16.6 0.439 3.2  4.0 0.793  2.3  6.4
## Paul Pierce        81 37.4 20.5  6.7 14.6 0.457 5.7  6.8 0.830  1.5  3.8
## Dwight Howard      79 35.7 20.6  7.1 12.4 0.572 6.4 10.7 0.594  0.0  0.0
## Stephen Jackson    59 39.7 20.7  7.0 16.9 0.414 5.0  6.0 0.826  1.7  5.2
## Ben Gordon         82 36.6 20.7  7.3 16.0 0.455 4.0  4.7 0.864  2.1  5.1
## Zachary Randolph   50 35.1 20.8  8.3 17.5 0.475 3.6  4.9 0.734  0.6  1.9
## Caron Butler       67 38.6 20.8  7.3 16.2 0.453 5.1  6.0 0.858  1.0  3.1
## Vince Carter       80 36.8 20.8  7.4 16.8 0.437 4.2  5.1 0.817  1.9  4.9
## David West         76 39.3 21.0  8.0 17.0 0.472 4.8  5.5 0.884  0.1  0.3
## Michael Redd       33 36.4 21.2  7.5 16.6 0.455 4.0  4.9 0.814  2.1  5.8
## Devin Harris       69 36.1 21.3  6.6 15.1 0.438 7.2  8.8 0.820  0.9  3.2
## Amare Stoudemire   53 36.8 21.4  7.6 14.1 0.539 6.1  7.3 0.835  0.1  0.1
## Joe Johnson        79 39.5 21.4  7.8 18.0 0.437 3.8  4.6 0.826  1.9  5.2
## Tony Parker        72 34.1 22.0  8.9 17.5 0.506 3.9  5.0 0.782  0.3  0.9
## Antawn Jamison     81 38.2 22.2  8.3 17.8 0.468 4.2  5.6 0.754  1.4  3.9
## Brandon Roy        78 37.2 22.6  8.1 16.9 0.480 5.3  6.5 0.824  1.1  2.8
## Chris Bosh         77 38.1 22.7  8.0 16.4 0.487 6.5  8.0 0.817  0.2  0.6
## Chris Paul         78 38.5 22.8  8.1 16.1 0.503 5.8  6.7 0.868  0.8  2.3
## Carmelo Anthony    66 34.5 22.8  8.1 18.3 0.443 5.6  7.1 0.793  1.0  2.6
## Al Jefferson       50 36.6 23.1  9.7 19.5 0.497 3.7  5.0 0.738  0.0  0.1
## Kevin Martin       51 38.2 24.6  6.7 15.9 0.420 9.0 10.3 0.867  2.3  5.4
## Kevin Durant       74 39.0 25.3  8.9 18.8 0.476 6.1  7.1 0.863  1.3  3.1
## Danny Granger      67 36.2 25.8  8.5 19.1 0.447 6.0  6.9 0.878  2.7  6.7
## Dirk Nowitzki      81 37.7 25.9  9.6 20.0 0.479 6.0  6.7 0.890  0.8  2.1
## Kobe Bryant        82 36.2 26.8  9.8 20.9 0.467 5.9  6.9 0.856  1.4  4.1
## LeBron James       81 37.7 28.4  9.7 19.9 0.489 7.3  9.4 0.780  1.6  4.7
## Dwyane Wade        79 38.6 30.2 10.8 22.0 0.491 7.5  9.8 0.765  1.1  3.5
##                     X3PP ORB DRB  TRB  AST STL BLK  TO
## Nate Robinson      0.325 1.3 2.6  3.9  4.1 1.3 0.1 1.9
## Allen Iverson      0.283 0.5 2.5  3.0  5.0 1.5 0.1 2.6
## Rashard Lewis      0.397 1.2 4.6  5.7  2.6 1.0 0.6 2.0
## Chauncey Billups   0.408 0.4 2.6  3.0  6.4 1.2 0.2 2.2
## Maurice Williams   0.436 0.6 2.9  3.4  4.1 0.9 0.1 2.2
## Shaquille O'neal   0.000 2.5 5.9  8.4  1.7 0.7 1.4 2.2
## Josh Howard        0.345 1.1 3.9  5.1  1.6 1.1 0.6 1.7
## LaMarcus Aldridge  0.250 2.9 4.6  7.5  1.9 1.0 1.0 1.5
## Ray Allen          0.409 0.8 2.7  3.5  2.8 0.9 0.2 1.7
## John Salmons       0.417 0.7 3.5  4.2  3.2 1.1 0.3 2.1
## Richard Hamilton   0.368 0.7 2.4  3.1  4.4 0.6 0.1 2.0
## O.J. Mayo          0.384 0.7 3.1  3.8  3.2 1.1 0.2 2.8
## Corey Maggette     0.253 1.0 4.6  5.5  1.8 0.9 0.2 2.4
## Andre Iguodala     0.307 1.1 4.6  5.7  5.3 1.6 0.4 2.7
## Rudy Gay           0.351 1.4 4.2  5.5  1.7 1.2 0.7 2.6
## Pau Gasol          0.500 3.2 6.4  9.6  3.5 0.6 1.0 1.9
## Monta Ellis        0.308 0.6 3.8  4.3  3.7 1.6 0.3 2.7
## Tim Duncan         0.000 2.7 8.0 10.7  3.5 0.5 1.7 2.2
## Deron Williams     0.310 0.4 2.5  2.9 10.7 1.1 0.3 3.4
## Richard Jefferson  0.397 0.7 3.9  4.6  2.4 0.8 0.2 2.0
## Jason Terry        0.366 0.5 1.9  2.4  3.4 1.3 0.3 1.6
## Jamal Crawford     0.360 0.4 2.6  3.0  4.4 0.9 0.2 2.3
## Yao Ming           1.000 2.6 7.2  9.9  1.8 0.4 1.9 3.0
## Al Harrington      0.364 1.4 4.9  6.2  1.4 1.2 0.3 2.2
## Paul Pierce        0.391 0.7 5.0  5.6  3.6 1.0 0.3 2.8
## Dwight Howard      0.000 4.3 9.6 13.8  1.4 1.0 2.9 3.0
## Stephen Jackson    0.338 1.2 3.9  5.1  6.5 1.5 0.5 3.9
## Ben Gordon         0.410 0.6 2.8  3.5  3.4 0.9 0.3 2.4
## Zachary Randolph   0.330 3.1 6.9 10.1  2.1 0.9 0.3 2.3
## Caron Butler       0.310 1.8 4.4  6.2  4.3 1.6 0.3 3.1
## Vince Carter       0.385 0.9 4.2  5.1  4.7 1.0 0.5 2.1
## David West         0.240 2.1 6.4  8.5  2.3 0.6 0.9 2.1
## Michael Redd       0.366 0.7 2.5  3.2  2.7 1.1 0.1 1.6
## Devin Harris       0.291 0.4 2.9  3.3  6.9 1.7 0.2 3.1
## Amare Stoudemire   0.429 2.2 5.9  8.1  2.0 0.9 1.1 2.8
## Joe Johnson        0.360 0.8 3.6  4.4  5.8 1.1 0.2 2.5
## Tony Parker        0.292 0.4 2.7  3.1  6.9 0.9 0.1 2.6
## Antawn Jamison     0.351 2.4 6.5  8.9  1.9 1.2 0.3 1.5
## Brandon Roy        0.377 1.3 3.4  4.7  5.1 1.1 0.3 1.9
## Chris Bosh         0.245 2.8 7.2 10.0  2.5 0.9 1.0 2.3
## Chris Paul         0.364 0.9 4.7  5.5 11.0 2.8 0.1 3.0
## Carmelo Anthony    0.371 1.6 5.2  6.8  3.4 1.1 0.4 3.0
## Al Jefferson       0.000 3.4 7.5 11.0  1.6 0.8 1.7 1.8
## Kevin Martin       0.415 0.6 3.0  3.6  2.7 1.2 0.2 2.9
## Kevin Durant       0.422 1.0 5.5  6.5  2.8 1.3 0.7 3.0
## Danny Granger      0.404 0.7 4.4  5.1  2.7 1.0 1.4 2.5
## Dirk Nowitzki      0.359 1.1 7.3  8.4  2.4 0.8 0.8 1.9
## Kobe Bryant        0.351 1.1 4.1  5.2  4.9 1.5 0.5 2.6
## LeBron James       0.344 1.3 6.3  7.6  7.2 1.7 1.1 3.0
## Dwyane Wade        0.317 1.1 3.9  5.0  7.5 2.2 1.3 3.4
library(RColorBrewer)
## Warning: package 'RColorBrewer' was built under R version 3.5.2
nba_heatmap <- heatmap(nba_matrix, Rowv=NA, Colv=NA, col = brewer.pal(9,"Blues"), scale="column", margins=c(5,10), main = "Basketball Stats 2008", margins - c(NA,200,60,NA))