Skip to content

Including images when output dir is elsewhere #2408

@Stefan2015-5

Description

@Stefan2015-5

I have a simple.Rmd file with no more than:

test

``` {r Graph2,  fig.width=7.7,fig.height=6.8}
plot(1,1)

``` 

If I use

knitr::knit2html("simple.rmd", output= "OUT.html") 

everything is fine.
If I use

some_where_else <- "C:\\Temp\\"
knitr::knit2html("simple.rmd", output=paste0(some_where_else, "OUT.html") )

the image is not included.

Warnmeldungen:
1: In replace(z) :
 File 'figure/Graph2-1.png' not found (hence cannot be embedded).

Is this intended?

Versions: R 4.5.0 knitr 1.50
It works under R 4.3.3 and older knitr version 1.23 or something

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions