I have the following code that perform hiearchical
clustering and plot them in heatmap.
library(gplots)
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…
I have:
library(gplots);
x<-matrix(seq(1:100),nrow=10,byrow=TRUE);
heatmap.2(x, Rowv=NA, Colv=NA, scale="none", main="This title will be cut off by the white space where the non-existant key is supposed to go.", col=gray((255:0)/255),…
Is there a way to draw a graph from the Incidence matrix.
By graph I mean http://en.wikipedia.org/wiki/Graph_(mathematics) not a plot.
Up till now I found only how to convert incidence matrix to a adjacency matrix.
In R this is possible with an…
I have these two plots (a heatmap and a stacked barplot). How can I put these plots near each other? Indeed I want to integrate these two plots.
Thanks for any help.
Here is my script:
df.bar <-…
In an R markdown report rendered to both PDF and HTML, I would like to colorize text with different transparencies.
For example, I would like to use the same orange with 3 different alpha values (0.3, 0.6, 1.0).
Nicholas Hamilton provides a function…
I am currently writing my thesis and I have one thing I could not solve by searching the web. I have some datasets and I have to compare the results before and after, and I would like to visualise it by comparing two sets of histograms (both sets…
I am trying to plot several plots of "state sequence object" created with the TraMineR package using the plot_grid() function. My main problem is, that I can not store the plots created with the seqplot() function in a list. My problem is not about…
I am using heatmap.2 in gplots to create heatmaps in R. My code used to work fine for creating a heatmap. But recently it started throwing errors. I am not sure why it is happening.
# Matrix to feed heatmap.2
mat = as.matrix(sort_pkmat)
# color…
I want to know how to generate an automatized sequence from 0 to 100, with numbers each 5 positions only, all the rest should be NA values. At the end I would like to have something like this:
> labCol
[1] 0 NA NA NA NA 5 NA NA NA NA 10 NA NA NA…
I am trying to plot a matrix of values over a range using heatmap.2. The columns are the range (for example, 0 to 100). There are too many column labels to display clearly. Is there a way to display every Nth one (0, 10, 20, etc)? I want all the…
I used the following code:
library("gplots")
heatmap.2(assay(vsd)[ens_union,], trace = "none", density.info = "none")
To produce the following heatmap:
As you can see, the row labels have been cut-off (the first one should, for instance, be…
I am running R (v. 3.0.3) on OSX (v. 10.9.2).
When trying to install the 'gplots' package in R studio with the following command, I get an error:
> library("gplots")
Error in library("gplots") : there is no package called ‘gplots’
I have seen…
My problem is that I would like to create plot with mean values and standard deviation.
I found the function plotmeans in package gplots and now I would like to add a trendline to that graph. I try to do this with abline but it is not working. I…
I´m looking to make a graph that looks like this:
in R.
The basic idea is to have a variable on each axis and graph the interactions between those variables, is there any way to connect the axis of different plots, or to do a single graph like…
I really like how balloonplot generates the balloon plots with the grid, moreover it keeps the cells with value of zero but does not show the circle. Here is an example,
dt <- as.table(as.matrix(mtcars[1:10,]))
balloonplot(t(dt), xlab ="", ylab="",…