From dlr32 at cornell.edu  Wed Jun 14 01:46:05 2006
From: dlr32 at cornell.edu (Dan Rabosky)
Date: Tue, 13 Jun 2006 19:46:05 -0400
Subject: [Rd] Building R package: pdf problems
In-Reply-To: <Pine.LNX.4.64.0606130657440.23931@gannet.stats.ox.ac.uk>
References: <5.2.1.1.2.20060612224250.03218f78@postoffice9.mail.cornell.edu>
	<5.2.1.1.2.20060612204709.0318b4b0@postoffice9.mail.cornell.edu>
	<5.2.1.1.2.20060612204709.0318b4b0@postoffice9.mail.cornell.edu>
	<5.2.1.1.2.20060612224250.03218f78@postoffice9.mail.cornell.edu>
Message-ID: <5.2.1.1.2.20060613191638.02ecbff8@postoffice9.mail.cornell.edu>


OK - the problem seemed (in part) to be the lack of Rd.sty, which is 
addressed below.

http://www.murdoch-sutherland.com/Rtools/miktex.html

When I followed the instructions on Duncan's site (using 'workaround 4'), 
things appeared to work.  R CMD Rd2dvi --pdf <library/package> creates a 
directory .Rd2dvi, which contains a file Rd2.pdf.  This file contains the 
'package description' page (with version, maintainer, & build info), but 
nothing else (I checked this on several packages, including grDevices).

The main error messages I receive appear to be:

RHOME: not found

cd: cant cd to c/cygdrive/c/Program
cp: cannot stat '.Rd2dvi/Rd2.pdf': No such file or directory

Oddly (for me), these results are different depending on the package.  For 
example, when I run exactly the same command (R CMD Rd2dvi --pdf 
<library/packagename> on grDevices, I get the first page, nothing else (and 
an error message about no man directory found).

When I run my package, it does the package name page, plus the first 3 
functions, and generates the index, but skips everything else.  Same story 
with several other packages I have installed from CRAN.  Even more oddly, 
results do not seem repeatable.  For example, I have the package 'ape' 
installed.  The first time I ran R CMD Rd2dvi -- pdf, I only created the 
title page in pdf.  I deleted the .Rd2dvi directory generated, and 
repeated.  This time, I obtained the title, and the first few functions, 
but omitting 90% of what should be there.

Sorry - I really don't understand what is going on here.

~Dan



>>I only get a .dvi manual when running 'check'.
>
>Yes, 'check' only checks that the latex can be compiled.  It is not trying 
>to create usable output for you: for that use R CMD Rd2dvi.
>
>E.g. for a PDF manual for package grDevices, use
>
>R CMD Rd2dvi --pdf .../library/grDevices
>
>which works for me.









Dan Rabosky
Department of Ecology and Evolutionary Biology
237 Corson Hall
Cornell University
Ithaca, NY14853-2701 USA
607 254 4262 (office)
607 592 4636  (cell)
DLR32 at cornell.edu
web: http://www.birds.cornell.edu/evb/Graduates_Dan.htm



[Rd] Building R package: pdf problems
Dan Rabosky