Trouble with ESS and Sweave

April 23, 2010
By

[This article was first published on Shige's Research Blog, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Last time I tried to sweave a document from with Emacs+ESS, I was using an earlier version of ESS (the current version is 5.8), and things seemed to be fine. Today when I tried to sweave a simple document and produced PDF output, I got error message of “.pdf”: exited abnormally with code 2“. I posted a message to the ESS mailing list, but so far no solutions have been reported. 


Here is a very simple .Rnw file I used to reproduce the error: 


---------------------------------------
\documentclass[12pt]{article}

%\usepackage{tikz}
%\usepackage{fullpage}
\usepackage{Sweave}

\begin{document}

This document outlines the analysis to be carried out to look at the
relationship between prenatal famine exposure and fetal loss risk.

\end{document}
-----------------------------------------

Before this can be fixed, I will rely on Eclipse for all my sweaving. 


---------------- April 26 ------------------------

Here is my own solution: 


from line 177 of ess-svy.el:

-      (shell-command (concat

-       (if (and ess-microsoft-p (w32-shell-dos-semantics))

-           "start \"" pdfviewer "\" \"" namestem ".pdf\""

-                 "\"" pdfviewer "\" \"" namestem ".pdf\" &"))))

+      (shell-command (concat

+                 "\"" pdfviewer "\" \"" namestem ".pdf\"")))

To leave a comment for the author, please follow the link and comment on their blog: Shige's Research Blog.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Tags: ,

Comments are closed.

Search R-bloggers

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)