Rotating embedded images in R Markdown

Hello Community,

I've ran into some kind of a pickle, and I would appreciate your assistance. I have an image embedded in my R Markdown code but I want it to rotate at an angle of 180, I've tried inserting the code {out.extra='angle=180'} after the image URL but that doesn't do the trick.

What should I do? Are there any packages I need to install or is there code that I'm missing?

Hi @Saiint

---
title: "187670"
author: "Saiint"
date: "2024-06-07"
output: html_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

# Rotated plot

```{r pressure, echo=FALSE, out.extra="style='transform:rotate(180deg);'"}
plot(pressure)
```

does this do what you want?

Hello @vedoa, thanks for the response. To answer your question, not exactly, let show you an example:

Golden Arrow

so how do I rotate that arrow?

More or less the same

---
title: "187670"
author: "Saiint"
date: "2024-06-07"
output: html_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

# Rotated gif

![](https://www.r-project.org/logo/Rlogo.png){style='transform:rotate(180deg);'}

1 Like

Perfect! Thank you so much for your assistance :+1:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.