TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to insert a figure using Sweave which is located in the path C:\Users\eccehomo\Documents\mi\fig1.png. I'm using the package knitrwhich has a function called fig.pathbut I'm getting many errors for such a simple thing! Here's one of the things I have tried:


share|improve this question
up vote 3 down vote accepted

Use \includegraphics{\Sexpr{f}}. LaTeX does not know the variables in R.

share|improve this answer
thanks for replying it worked! – AP13 Jun 1 '13 at 7:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.