Complex Heatmap subscripts
0
0
Entering edit mode
6.1 years ago
Seigfried ▴ 80

Hello all

I love the package 'Complex Heatmaps' to draw heatmaps in R and I quit using Heatmap.2.

However in heatmap.2, I could use something like expression(paste) to get some words as subscripts.

main = expression(paste("Log[2]","(FPKM) Values"))

Unfortunately, expression doesn't seem to work in Complex Heatmap. Any of you Gurus can help me out with this?

Error in (function (cl, name, valueClass)  :  assignment of an object of class 揺xpression?is not valid for @憂ame?in an object of class 揌eatmap? is(value, "character") is not TRUE

I just want to use subscripts in titles in Complex Heatmap. Thanks!

Complex Heatmap subscript • 2.5k views
ADD COMMENT
1
Entering edit mode

It appears to be supported: Mathematical Expression Causes Error #113

ADD REPLY
0
Entering edit mode

Well, for me it works with column_title and not with name.

name = expression(log[2]~score),
column_title = expression(log[2]~score),
ADD REPLY
1
Entering edit mode

Thank you and apologies!

I got it to work in case i wanted multiple words in the subscript list(title = expression(log[hello~world]~Normalised~Values))

So I guess as usual [ ] denotes the start-end of the subscript. But I do not know why the tilde (~) is a substitute for a space

https://stackoverflow.com/questions/14976331/use-of-tilde-in-r-programming-language So it is a formula used as text?

ADD REPLY
0
Entering edit mode

Yes, the tilde (~) is the space. It's not quite a formula but rather a mathematical expression.

ADD REPLY

Login before adding your answer.

Traffic: 1607 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