Displaying 13 results from an estimated 13 matches for "rowind".
Did you mean:
rewind
2020 Jun 21
1
Possible bug in heatmap()?
...norm(10*5), 10, 5)
heatmap(x, labCol=1:5)
Error in axis(1, 1L:nc, labels = labCol, las = 2, line = -0.5, tick = 0, :
'at' and 'labels' lengths differ, 5 != 10
Works fine under 4.0.1. Looking at the code from 4.0.1 vs. Rdevel, esp. this part sticks out:
labRow <- labRow[rowInd] %||% rownames(x) %||% (1L:nr)[rowInd]
labCol <- labCol[rowInd] %||% colnames(x) %||% (1L:nc)[colInd]
Maybe this should be:
labCol <- labCol[colInd] %||% colnames(x) %||% (1L:nc)[colInd]
> sessionInfo()
R Under development (unstable) (2020-06-21 r78727)
Platform: x86_64-pc-linux...
2009 Sep 12
0
consistent results with heatmap.2
...4-17)
Copyright (C) 2009 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
# The correct results
> hv <- heatmap.2(x,
col=col.palette,
Colv=FALSE,
key=TRUE,
Rowv=cc1$order,
dendrogram="row",
scale="none",
tracecol="white",
cexCol=.5)
> hv$rowInd
[1] 26 23 5 19 15 4 2 16 21 13 22 12 10 20 7 3 25 1 8 11 24 9 18 14 17
[26] 6
# Attempt 1
> cc = as.dendrogram(hclust(dist(x)))
> hv1 <- heatmap.2(x,
col=col.palette,
Rowv=cc,
Colv=FALSE,
key=TRUE,
dendrogram="row",
scale="none",
tracecol="white&q...
2012 Feb 28
1
Unexpected behaviour for RowSideColors in function heatmap
...ument does not solve the problem:
heatmap(cU, symm = TRUE, distfun = function(c) as.dist(1 - c),
ColSideColors=sideCols, RowSideColors=rev(sideCols))
I had a look at the the function code and found that this change fixes the problem:
Replace
image(rbind(1L:nr), col = RowSideColors[rowInd], axes = FALSE)
with
image(rbind(if(revC) nr:1L else 1L:nr), col = RowSideColors[rowInd], axes = FALSE)
I am using the current version of R for Mac OS X:
> sessionInfo()
R version 2.14.1 (2011-12-22)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
locale:
[1] en_GB.UTF-8/en_GB.UTF...
2008 Jul 31
2
sort rows of matrix by rows of another matrix
Hello all,
I am trying to sort rows of one matrix by rows of another. Given a1 and a2:
------
> a1
[,1] [,2] [,3]
[1,] 7 6 8
[2,] 4 2 4
[3,] 4 7 2
[4,] 0 3 8
a1 <-
structure(c(7, 4, 4, 0, 6, 2, 7, 3, 8, 4, 2, 8), .Dim = c(4L, 3L))
> a2
[,1] [,2] [,3]
[1,] 101 102 103
[2,] 101 102 103
[3,] 101 102 103
[4,] 101 102 103
a2 <-
2013 Apr 03
1
how to re-shape a matrix
Hi All,
I have a matrix like
m <- matrix( letters[1:10], ncol=5)
How to conver it to 10 * 3 matrix, which the first col is row index of m, second col is colum index of m and third column is the value of matrix, say
1 1 1 "a"
2 1 2 "c"
1 3 "e"
etc...
Thanks.
[[alternative HTML version deleted]]
2004 Feb 16
1
labRow/labCol options in heatmap()
...labels are specified, the row/column
labels (or indices) of the input matrix are taken as labels and
re-ordered together with the rows and columns of the matrix before
plotting, whereas labels supplied via labRow/labCol are plotted
in the original order.
Code from heatmap(), R 1.8.1:
x <- x[rowInd, colInd]
if (is.null(labRow))
labRow <- if (is.null(rownames(x)))
(1:nr)[rowInd]
else rownames(x)
if (is.null(labCol))
labCol <- if (is.null(colnames(x)))
(1:nc)[colInd]
else colnames(x)
...
axis(1, 1:nc, labels = labCol, las = 2, line = -0.5, tick = 0,...
2010 Feb 23
2
heatmap.3
...col(lmat))
op <- par(no.readonly = TRUE)
on.exit(par(op))
layout(lmat, widths = lwid, heights = lhei, respect = FALSE)
if (!missing(RowSideColors)) {
if (!is.matrix(RowSideColors)){
par(mar = c(margins[1], 0, 0, 0.5))
image(rbind(1:nr), col = RowSideColors[rowInd], axes = FALSE)
}
else{
par(mar = c(margins[1], 0, 0, 0.5))
rsc = RowSideColors[rowInd, ]
rsc.colors = matrix()
rsc.names = names(table(rsc))
rsc.i = 1
for (rsc.name in rsc.names) {
rsc.colors[rsc.i] = rsc.name...
2012 Nov 07
1
Issues with Heat Map Images
Hello,
I have a large data set from RNA sequencing and I am trying to make a heat
map of my data. I have am having issues formatting my heat map figure. My
data set is large with the log2 fold change for over 6oo genes across 4
treatments. My csv file is formatted as such:
Gene Drought Ozone
Temp1 Temp2
Glyma0041s00260
2007 Apr 25
1
heatmap and phylogram / dendogram ploting problem, ape package
I am having trouble displaying a dendrogram of evolutionary
relationships (a phylogram imported from the ape package) as the
vertical component of a heatmap, but keeping the hierarchical
clustering of the horizontal component. The relationships of the
vertical component in the generated heatmap are not that of the
dendrogram, although the ordering is.
In more detail, I am attempting to generate
2005 Aug 11
0
easier way to print heatmap on multiple pages?
...nitial heatmap, with all 1000 rows and write it to an
object 'heatAll'
heatAll = heatmap.2(combined.int.top, col = cm.colors(256), trace =
"none")
pdf(file="~/Desktop/Alfalfa-Ladak-StemV3.pdf", width=8, height=12,
pointsize=4)
for(i in 1:20){
selected = heatAll$rowInd[((i-1)*50):((i-1)*50+50)] ##get original
row order in groups of 50
heatmap.2(combined.int.top[selected,], Rowv = FALSE, ##prevent row
re-ordering
Colv=heatAll$colInd,
col=cm.colors(256),
trace="none", margins = c(9,8),
main=paste("page", i, sep=" "))...
2006 Feb 09
0
Color key in Heat map
....9 30773.4 32918.6 34412.1 33954.6
[10,] 36.3 69.8 92.0 52.0 57.3 64.9
Also, is it possible to get the order in which the rows will be clustered ,
starting with the first rows joined into a group and then followed by other
grps added. I thought i could extract the order by using $rowInd, but looks
like it's the order in which the rows are reordered in the map. Please let
me know how to do this.
Thanks,
Vasu.
[[alternative HTML version deleted]]
2006 Feb 10
0
Heat Map
...ng
hierarchical clustering and display the results in the form of a heat map.
In a Heat map, is it possible to get the order in which the rows will be
clustered , starting with the first rows joined into a group and then
followed by other groups added. I thought i could extract the order by using
$rowInd, but looks like it's the order in which the rows are reordered in
the map.
Also, is it possible to add a color key to the heatmap, similar to the one
displayed in a level plot.
Thanks,
Vasu.
Research Graduate Student
Bioinformatics Research Group
UofL, KY
[[alternative HTML version deleted...
2009 Jul 21
1
problem with heatmap.2 in package gplots generating non-finite breaks
..."na.color" "na.rm" "nbr" "nc"
[45] "ncol" "notecex" "notecol" "nr"
[49] "op" "retval" "revC" "rm"
[53] "rowInd" "rowsep" "RowSideColors" "Rowv"
[57] "scale" "scale01" "sepcolor" "sepwidth"
[61] "sx" "symbreaks" "symkey" "symm"
[65] "tm...