Hello All,
I am running the following code in RStudio, and I keep on getting an error
message that says: "Error in plot.new() : figure margins too large"
Is there something that I am doing wrong?
# Import Data
nba <- read.csv("http://datasets.flowingdata.com/ppg2008.csv", sep=",")
nba
#Sort Data (sorting by Points, but could be sorting by any other variable)
nba <- nba[order(nba$PTS),]
#Prepare Data: makes rows by player name instead of Row Number
row.names(nba) <- nba$Name
#Prepare Data: don't need first column anymore, so we get rid of it
nba <- nba[,2:20]
#Prepe Data: change data from a data frame to a data matrix
nba_matrix <- data.matrix(nba)
#Create Heat Map
nba_heatmap <- heatmap(nba_matrix, Rowv=NA, Colv=NA, col = cm.colors(256),
scale="column", margins=c(5,10))
Karly Harrod
LBNL Summer Intern
[email protected]
Lawrence Berkeley National Laboratory
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.