I am new to R and first time trying flexdashboard.
When I use below code then instead of getting user input dropdown I get selectInput as text in dashboard
---
title: "2nd Flex Dashboard"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
runtime: shiny
---
```{r setup, include=FALSE}
library(flexdashboard)
library(DT)
library(shiny)
Column {.sidebar}
selectInput("xvar", "X variable", colnames(mydata))
# mydata exist in my environment which is mydata <- mtcars
In output I am getting: {r}{r, echo=False} selectInput("xvar", "X variable", colnames(mydata))
If I do the following:
selectInput("xvar", "X variable", colnames(mydata))
then I get error:
.knit.mdError: path for html_dependency not provided
what is wrong with the code and how should I correct it. Please help as I am new to R & flexdashbard/Shiny