0

I have a hard time trying to understand what happened here, I have a list params$output_file to return through R shiny app. It didn't work if I use loop, it just worked only outside loop

If I used outside loop, it worked. I have been spent a whole day try to figure out, but I have no luck, if anyone points out what wrong with it. I am appreciated. enter image description here

The plots showed up, which were outside the loop, but there is nothing inside loop

---
title: Test
output: html_document
params:
  output_file: NA
---




```{r  results='asis', echo=FALSE, cache=TRUE}
library(knitr)

# Outside loop, it is working
params$output_file[[1]]


params$output_file[[2]]


params$output_file[[3]]



for(i in seq_along(params$output_file)){
  
  print("Inside Loop print nothing")

  params$output_file[[i]]

}



3

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.