Error on labeledHeatmap() function - WGCNA 1.68
0
0
Entering edit mode
feltrin88 • 0
@feltrin88-21658
Last seen 6.3 years ago

I am having trouble to generate a heatmap using the labeledHeatmap() function on WGCNA 1.68. I tried with both my own data as well with the reproducible example (available on https://www.rdocumentation.org/packages/WGCNA/versions/1.63/topics/labeledHeatmap), and I am getting the same error message:

library(WGCNA)
nCol = 8; nRow = 7;
mat = matrix(runif(nCol*nRow, min = -1, max = 1), nRow, nCol);

rowColors = standardColors(nRow);
colColors = standardColors(nRow + nCol)[(nRow+1):(nRow + nCol)];

rowColors;
colColors;

sizeGrWindow(9,7)
par(mfrow = c(2,2))
par(mar = c(4, 5, 4, 6));



# Label rows and columns by text:

labeledHeatmap(mat, xLabels = colColors, yLabels = rowColors, 
               colors = blueWhiteRed(50),
               setStdMargins = FALSE, 
               textMatrix = signif(mat, 2),
               main = "Text-labeled heatmap");

> Error in .approxfun(x, y, v, method, yleft, yright, f): argument "n" is missing, with no default
Traceback:

1. labeledHeatmap(mat, xLabels = colColors, yLabels = rowColors, 
 .     colors = blueWhiteRed(50), setStdMargins = FALSE, textMatrix = signif(mat, 
 .         2), main = "Text-labeled heatmap")
2. colors()
3. rampseq.int(0, 1, length.out = n))
4. roundcolor(convertColor(cbind(palette[[1L]](x), palette[[2L]](x), 
 .     palette[[3L]](x), if (alpha) palette[[4L]](x)), from = "Lab", 
 .     to = "sRGB"))
5. pmax(pmin(rgb, 1), 0)
6. pmin(rgb, 1)
7. convertColor(cbind(palette[[1L]](x), palette[[2L]](x), palette[[3L]](x), 
 .     if (alpha) palette[[4L]](x)), from = "Lab", to = "sRGB")
8. nrow(color)
9. cbind(palette[[1L]](x), palette[[2L]](x), palette[[3L]](x), if (alpha) palette[[4L]](x))
10. palette[[1L]](x)
11. .approxfun(x, y, v, method, yleft, yright, f)
WGCNA R • 1.1k views
ADD COMMENT

Login before adding your answer.

Traffic: 600 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6