Home > Net >  Why is R markdown not able to format my patchwork figure?
Why is R markdown not able to format my patchwork figure?

Time:04-05

I have a question regarding markdown and patchwork. Let's say I combined figures FigureLength and FigureWidth to make CombinedFigure through patchwork (two figures on top of each other):

library(datasets)
library(patchwork)
data(iris)

FigureLength <- iris %>% 
  ggplot(aes(x = Species, y = Sepal.Length))  
  geom_boxplot()

FigureWidth <- iris %>% 
  ggplot(aes(x = Species, y = Sepal.Width))  
  geom_boxplot()

CombinedFigure <- FigureLength / FigureWidth

enter image description here

  • Related