I looked it up and draw is a wrapper around base graphics functions, as such they are not compatible with ggplot. However, shiny supports output from both ggplot and base plotting so it should still integrate just fine.
Example:
library(draw)
library(shiny)
ui <- fluidPage(
plotOutput("myplot")
)
server <- function(input, output, session) {
output$myplot <- renderPlot({
drawSettings(pageWidth = 5, pageHeight = 5, units = "inches")
drawPage()
drawBox(x = 2.5, y = 2.5, width = 1, height = 1)
drawCircle(x = 2.5, y = 2.5, radius = 0.5)
drawLine(x = c(1, 4),
y = c(1 ,1))
drawText(x = 2.5, y = 2.5, text = "TEXT")
})
}
shinyApp(ui, server)