1

I would like to create a table in R Markdown with PDF output that can hold images. In addition, there has to be a clear separation between the cells of the table.

Hereby an example: table with pictures and formatting

The closest solution I found but that was not satisfactory for me is this one: Including an image in R Markdown PDF table

I also checked the various table solutions that can be produced in R: https://rfortherestofus.com/2019/11/how-to-make-beautiful-tables-in-r/

I have tried this:

```{r imgslink, echo=FALSE, fig.align='center'}
    img1_path <- "yellowstone.png"
    img2_path <- "yosemite.png"
    img3_path <- "zion.png"
```   

| Park    | Location      | Established  |
|:-------:|:-------------:|:------------:|
| Yellowstone |Montana, Wyoming, Idaho| ![](`r img1_path`)|
| Yosemite |California| ![](`r img2_path`)|
| Zion |Utah| ![](`r img3_path`)|`
ViviG
  • 1,613
  • 1
  • 9
  • 23
DanD
  • 23
  • 6

0 Answers0