fail when import image

I have a problem to import an image

We need to see your code. The screenshot does not give us much.

Have a look at

It looks like attempting to use R Markdown syntax in a vanilla R script. An R Notebook, or R Markdown script should be used, with the image embedding syntax being placed within a chunk

That is markdown syntax, is meant to be used in a Rmd file not in the R console.

It's a new Rmarkdown presentation, there are no other codes. I tried to used it also in Rmd file but nothing's happened

Ok, I may have mispoken.
The markdown image syntax doesnt live within chunks but outside of chunks the same as normal document text. Here is a complete example you can copy into a blank script, and preview/knit.

Also please do not use screenshots to communicate when the information you have is textual and can be copy pasted and formatted for the forum. Share code like I do in this example. triple backticks just like in markdown, apply a code format on these forum posts (when sharing markdown codes use quadruple backticks !)

---
title: "example of images in rmarkdown"
output: html_notebook
---
This is some text in the document
next will be the image:

![Yihui creator of Knitr](https://yihui.org/images/logo.png)

now an R code chunk
```{r}
1+2
```

You've reached the bottom
1 Like

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.