carpentries-incubator / high-dimensional-stats-r

High-dimensional statistics with R
https://carpentries-incubator.github.io/high-dimensional-stats-r
Other
12 stars 19 forks source link

echo=FALSE or simplify heatmap code in ep2 #165

Closed alanocallaghan closed 7 months ago

alanocallaghan commented 8 months ago

I feel like the code here should be massively simplified, so people can live code it, or just hidden

https://github.com/carpentries-incubator/high-dimensional-stats-r/blob/223978e453c4258db81f7bccb8110271e590a584/_episodes_rmd/02-high-dimensional-regression.Rmd#L116-L132

mallewellyn commented 8 months ago

Think the heatmap code is nice to know, but wasn't sure the best way to simplify. In the commit above, have suggested simply annotating and re-ordering the code so that annotation comes after the plotting arguments. Could also simplify by presenting the clustered heatmap:

library("ComplexHeatmap") age <- methylation$Age

Heatmap(methyl_mat, show_row_names = FALSE, show_column_names = FALSE, name = "M-value", row_title = "Feature", column_title = "Sample", top_annotation = columnAnnotation(age = age))

Or just go for echo=FALSE?