Skip to content

Instantly share code, notes, and snippets.

@andreagrioni
Created December 2, 2021 00:46
Show Gist options
  • Save andreagrioni/1a4fe9353da8ba9d5f47f20af278161f to your computer and use it in GitHub Desktop.
Save andreagrioni/1a4fe9353da8ba9d5f47f20af278161f to your computer and use it in GitHub Desktop.
add multiple images programatically within an Rmd file.
```{r, results = 'asis'}
# add path to folder with figures
plots <- list.files(folder_path)
# create string for image
for(i in plots){
filename <- file.path("plot", i)
cat("![text](",filename,")")
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment