Hi,
do you have a real minimal reprex you tried ?
It would help see what you are trying to do.
To interface R and python, you should look at
And how it works with Rmarkdown
https://rstudio.github.io/reticulate/articles/r_markdown.html
From your small piece of code, I understand you are trying to use flexdashboad with Shiny, right ?
This could be a little difference I guess - hence an important precision.