I'm trying to plot circular data from the circular library using a shiny app within a flexdashboard. The following code works until I "Open in a Browser" or upload to our server ... then I lose the graphs ????.
---
title: "Untitled"
output:
flexdashboard::flex_dashboard:
source_code: embed
runtime: shiny
---
```{r setup, include=FALSE}
library(flexdashboard)
library(circular)
data(fisherB1c)
data(wind)
windc <- circular(wind, type="angles", units="radians", template = "geographics")
```
Column {.sidebar}
--------------------------------------------------------
### Sidebar Column
```{r}
radioButtons("selection", label = h3("Make Seclection"),
choices = list("Wind Data"="windc",
"Fisher Data" = "fisherB1c"),
selected="windc")
```
Column
--------------------------------------------------------
### Circular Graphs
```{r}
renderPlot({
if(input$selection == "windc"){
plot(windc, cex=1.5, bin=720, stack=TRUE,
sep=0.035, shrink=1.3)
} else {
plot(fisherB1c, pch=16, col="blue",
stack=T, shrink=1.2, bins=720, ticks=T)
}
})
```