0

The error "Error: Aesthetics must be either length 1 or the same as the data (9): label" results when trying to plot heatmaps. I can see the error is related to the label aesthetic where the data is length 9 and the label is not.

I have tried adding more labels to prop.comp.fig$labels however this does not resolve the issue. Any suggestions?

> XinT2D.construct.full$prop.real
           alpha       beta       delta       gamma
Non T2D 1  0.7162162 0.17567568 0.067567568 0.040540541
Non T2D 2  0.1666667 0.54166667 0.083333333 0.208333333
Non T2D 3  0.6428571 0.23809524 0.071428571 0.047619048
Non T2D 4  0.5185185 0.37037037 0.000000000 0.111111111
Non T2D 5  0.4423077 0.42307692 0.096153846 0.038461538
Non T2D 6  0.7500000 0.14583333 0.083333333 0.020833333



> Est.prop.Xin$Est.prop.weighted

               alpha       beta       delta       gamma
Non T2D 1  0.42126940 0.53648795 0.033482969 0.008759678
Non T2D 2  0.05257339 0.89343698 0.017239679 0.036749952
Non T2D 3  0.81858825 0.10951505 0.049300668 0.022596027
Non T2D 4  0.48433929 0.41544477 0.000000000 0.100215942
Non T2D 5  0.37782440 0.53122889 0.068855461 0.022091253



> Est.prop.Xin$Est.prop.allgene

              alpha       beta       delta       gamma
Non T2D 1  0.7004240 0.13292731 0.072769436 0.093879235
Non T2D 2  0.4334588 0.25818018 0.081992464 0.226368506
Non T2D 3  0.8308755 0.05941726 0.054858719 0.054848514
Non T2D 4  0.7174639 0.08975881 0.005791882 0.186985398

Prop_comp_multi() https://xuranw.github.io/MuSiC/reference/Prop_comp_multi.html

The input code:

> prop.comp.fig = Prop_comp_multi(prop.real = 
data.matrix(XinT2D.construct.full$prop.real), prop.est = 
list(data.matrix(Est.prop.Xin$Est.prop.weighted), 
data.matrix(Est.prop.Xin$Est.prop.allgene)), method.name = c('MuSiC', 
'NNLS'), title = 'Heatmap of Real and Est. Prop' )
higs
  • 55
  • 3
  • Where is the code where you are actually trying to plot this data? It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. – MrFlick Apr 28 '20 at 17:19
  • Just added the example code which resulted in the Error – higs Apr 28 '20 at 18:01

0 Answers0