rstudio / rstudio/flexdashboard
Build a page via loop
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 848
- Forks
- 298
- PR merge metrics
- No merged PRs in 30d
Description
Is it possible to dynamically build a page using a loop? I've tried the approach below in an 'asis' block, but it doesn't seem to work.
cat(title, ' {data-icon="fa-line-chart"}\n')
cat("=====================================\n")
cat('\n')
for (i in seq_along(fields)) {
if (i %% col_no != 0) {
cat("Row\n")
cat("-------------------------------------\n")
cat('\n')
}
cat("### ", fields[[i]], "\n")
cat('\n')
create_plot(fields[i])
cat('\n')
}
There's a similar question on Stack Overflow.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Reproduce the R loop in issue #80 and compare its generated markdown and plot output with the linked Stack Overflow example; done means establishing whether loop-built pages are supported and recording a confirmed usage pattern or limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100