shiny flexdashboard inline output disappeared.

Hello!
I am running shiny with flexdashboard. There is no error message, but the following code does not work. It was supposed to generate inline output, but it didn't.

`# '`r renderUI(list(column(width=2, selectInput(inputId="selector",label=NULL, 
  choices=getModel("Portfolios",portfolio()))), 
  column(width=2,selectInput(inputId="monthYear", label=NULL,choices=c(now)) ) ) )`

However, when I changed the code above to

```{r}
 renderUI(
  list(column(width=2, selectInput(inputId="selector",label=NULL, 
                choices=getModel("Portfolios",portfolio()))), 
                column(width=2,selectInput(inputId="monthYear", label=NULL,choices=c(now)) ) 
  ))
```

It shows in a seperate line.

If anyone can help me I will appreciate it! Thank you.

One small note to help clarify. The second example is in a code chunk, and does work.

I have tried a hello world example below and that works both inline and within a chunk, which it should.

Is there any way to share an anonymized and simplified version of the app or is that not possible here?

Unfortunately with the given information it isn't entirely clear what functions you are using etc. But I'll give it my best guess! I'm guessing the getModel() function looks for a model living somewhere. This makes me think it may be a directory problem.

There is this interesting thing that happens when working with an Rmd in that the working directory (wd) becomes the directory where your Rmd lives. So if you execute something in the console and your wd is home but your Rmd is in home/R or something the reference between the console and the code chunk will be different. Generally you can avoid that with something like the {here} package (https://github.com/jennybc/here_here).

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