I'm having some trouble to assign specific colors to a numeric vector. My interest is to use VAR1.color in as the ColSidecolors in heatmap.2. My data frame has 1655 rows with no missing values. I produce the colorRampPalette vector with the max…
I performed regression analysis.
Now i need create plot depended vs prediction, where depend is initial values of dependent var(mpg) and predict is predicted values.
house_test=lm(mpg ~ 1 + hp + wt, data=mtcars)
prediction <-…
I'd like to reproduce a network graph with the same (or close) layout. I know that igraph has the tkplot.getcoords() function. I'd like to copy/get/set.seed a set of vertex coordinates based on the results of gplot, which is the SNA package's…
I am trying to create a joyplot using the ggridges package (based on ggplot2). The general idea is that a joyplot creates nicely scaled stacked density plots. However, I cannot seem to produce one of these using weighted density. Is there some way…
I have gone through the documentation of the heatmap.2() function in the gplots package in R looking for a way to code a color key for the ColSideColors argument. Is this supported? I would like to show which levels are represented by each color on…
I generated a heatmap using heatmap.2 of the gplots package:
library(gplots)
abc <-read.csv(file="abc.txt", header=T, sep="\t", dec=".")
abcm<-as.matrix(abc)
def <-read.csv(file="def.txt", header=T, sep="\t", dec=".")
defm<-as.matrix(def)
mean…
I am generating a chlorophyll map for lake. I want to fill the lake with blue colour where there is a very low chlorophyll concentration and light blue for NA values. I am using a code as given below
gplot(Chlorophyll_map_5) +…
I am trying to do an unbiased Hierarchical clustering with the following code
col.cell <- c("purple","orange", "green", "blue")[sampleinf$subtype]
heatmap.2(as.matrix(hm3),col=rev(morecols(50)),trace="none", main="Top 500 most variable genes across…
As indicated in the title above, I want to change the column labels in the heatmap figure produced by heatmap.2 from package gplots in R to symbols rather than text. May I know if it is possible, and if so, how to do it?
This is a sample code to…
Dear stackoverflow community, I have generated a heatmap on a random matrix from the following R code. I am having trouble interpreting the Color Key and Histogram at the top-left of the…
I want to create a heatmap using the heatmap.2 function from the gplots package. This is a minimal example.
require(gplots)
# create symmetric matrix
x = matrix(rnorm(100), nrow=10)
diag(x) <- 1
x[upper.tri(x)] <- …
I would like to make a heatmap that displays both magnitude and p-value of the number in each box. I want the color of each cell to describe the value (v) and I want the thickness of the border of each cell to describe the p-value.
df =…
I have the following code that perform hiearchical clustering and plot
them in heatmap.
set.seed(538)
# generate data
y <- matrix(rnorm(50), 10, 5, dimnames=list(paste("g", 1:10, sep=""),
paste("t", 1:5, sep="")))
# the actual data is much larger…