psh
psh

Reputation: 21

image fails to appear in .Rpres

In exploring Rstudio presentations, I ran into a presumably simple, but vexing, problem that my searches have not solved. In short, an image imported into my presentation does not appear; only the box with alt text does. With the same import in an Rmarkdown file, the image appears. I am running OSX 10.9.5 and RStudio 0.98.1091. Code examples below:

This .Rmd shows my image:

---
title: "Another Try"
author: "Me"
date: "today"
output: html_document
---
This is my image.

![my image](/path/to/my/file/myimage.png)

This .Rpres does not show my image:

anotherTry
========================================================
author: Me
date: Today

My Image
========================================================

![my image](/path/to/my/file/myimage.png)

Upvotes: 2

Views: 1214

Answers (2)

Joern
Joern

Reputation: 29

It seems to be that the image need to be in the source folder of the presentation

![my image](/path/to/my/file/myimage.png) doesn't work but

![my image](myimage.png) works, if the file is in the same directory

Upvotes: 2

dank
dank

Reputation: 851

The following (in file file.Rpres) works for me, with rstudio.

Title slide
===========
author: me
date: now

Test slide
==========

Below is a test image

![my image](testimage.png)

screen snapshot

Upvotes: 2

Related Questions