Making Heatmaps
From Powers Wiki
Revision as of 02:45, 16 August 2012 by Wiki Administrator (talk | contribs) (Created page with "==Load the data== The data can be prepared in csv or text file to load the data in to R. For example, to load ''list.csv'': data <- read.csv (“list.csv”) ==Name the row...")
Load the data
The data can be prepared in csv or text file to load the data in to R. For example, to load list.csv:
data <- read.csv (“list.csv”)
Name the rows
You can then name the rows of the heatmap like so:
Row.names(data) <- data$Name
To exclude the first column from the heat map, use a command of similar form to the following:
Type:Data <- data [,2: n]
In the above command, n is the number of columns to be included in the heat map.
To change the loaded data in to data matrix
Type: Data_matrix <- data.matrix (data)
To use gnuplot library
Note: Gnuplot package must be installed in R.