I have the following Rmarkdown document:
---
title: "Test"
runtime: shiny
author: "FOO"
date: "11/28/2017"
output: html_document
---
```{r echo = FALSE}
checkboxInput("rowzscore","Row Z-Score", TRUE)
```
``` {r echo = FALSE}
plotly::renderPlotly({
scale <- "none"
if (input$rowzscore) {
scale <- "row"
}
heatmaply::heatmaply(as.matrix(mtcars),
hclust_method = "ward.D2",
distfun = "pearson",
scale = scale
)
})
```
Which generate this App. As shown the figure below, I'd like to increase the height of the plot. How can I do that?
I looked at the documentation of renderPlotly, it does not allow the resizing of the object.
I tried using plotlyOutput like this,
```{r echo = FALSE}
shinyApp(
ui <- fluidPage(
checkboxInput("rowzscore","Row Z-Score", TRUE) ,
plotly::plotlyOutput('cool_plot', height="1000px")
),
server <- function(input,output) {
output$cool_plot <- plotly::renderPlotly({
scale <- "none"
if (input$rowzscore) {
scale <- "row"
}
heatmaply::heatmaply(as.matrix(mtcars),
hclust_method = "ward.D2",
distfun = "pearson",
scale = scale
)
})
}
)
```
the image gets further truncated:
What's the right way to do it?