Issue in getting user input with selectInput() in flexdashboard

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"
    orientation: columns
    vertical_layout: fill
runtime: shiny
```{r setup, include=FALSE}

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

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.