The task is to generate an app layout based on the folder structure on my server. There are folders and in each of them there are several RMarkdown files. I want a Shiny/Flexdash board app that will automatically take the folder structure with all the files in the folders, create a page for each folder and add an action button for each item on the respective site linked to the RMD file. So when you click the button, the file will open. (Shiny-App with folder structure)
Since the folder structure and the files inside are constantly changing and it would be too time consuming to edit the Shiny/Flexdashboard app itself, I would like to automate the creation of both the buttons and the pages.
Automatic page generation based on folder structure is not a problem (see code example), but automatic creation of action buttons is quite difficult. I've searched a variety of ways but haven't found anything that works for me.
Maybe someone has tried the same thing in the past and can help me.
for (i in 1:length(all_files$folder %>% unique()))
{
df <- all_files$folder %>% unique() %>% "["(i)
cat("\n")
cat("# ", df, "\n")
}
I tried different ways liked add actionButtons() in for-loops, for-loops packed into reactive, paste the actionButton()
code to the cat()
function etc. Also Google can't help me