umccr / RNAsum

Pipeline for generating RNAseq-based cancer patient reports
https://umccr.github.io/RNAsum/
Other
7 stars 4 forks source link

Move rm expression before circos table view #133

Closed pdiakumis closed 10 months ago

pdiakumis commented 10 months ago

Fixes #132. This actually took me a ridiculous amount of time to figure out. And I'm not even sure why the DT doesn't render with the rm afterwards. Anyway, works now!

pdiakumis commented 9 months ago

Figured this one out through a separate issue. From https://yihui.org/en/2017/06/top-level-r-expressions/

The if function returns the value of a last expression depending on the condition. For example, if (TRUE) A else B returns A, and if (FALSE) {A} else {B; C} returns C. With that in mind, you will understand why the ggplot object is not displayed in the if statement below:


library(ggplot2)
if (TRUE) {
  ggplot(mpg, aes(cty, hwy)) + geom_point()
  1 + 1  # the value of this expression is returned (and printed)
}