[R] dvips function gives "Documents not found" error
David Kelly
dkelly at alum.mit.edu
Mon Nov 24 20:09:17 CET 2003
Thanks to you both for your suggestions, and great to hear from the
author himself!
I may be thick, but I'm still having the problem. I did look at help for
tempdir(), but tempdir() just *returns* the directory that's used; it
doesn't allow me to change it. As a slightly different tack, I tried
using tempfile("dsk","\\kellytest")
but I still got the same error.
From looking at the source code line mentioned below, I wouldn't expect
the tempfile() call that I tried to make a difference anyway.
So: Is there someway I can change the value of tempdir() so I can
influence Hmisc? Also, in the source line quoted below, what is "tmp"
and do I have some way to change that to give it a path without spaces?
I'm looking for a workaround here to allow to do some further
testing/prototyping, not a permanent fix.
Thanks again --
David Kelly
--------------
On Mon, 24 Nov 2003 10:53:48 +0000 (GMT)
Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:
> This is a question about Hmisc, I believe, although you certainly did
> not mention it. Looking at the source code I see
>
> sys(paste("cd", tempdir(), sc, optionsCmds("latex"), tmp))
>
> do my guess is that it is writing .dvi files in tempdir().
> If you look up help on tempdir() you will see how to avoid this,
>
> Moral: don't guess, and don't make your readers guess either.
>
> And to Frank Harrell as author of Hmisc: spaces are valid in file names
> even on Unix/Linux, so it would be nice if this could be corrected.
I've resisted this until now. The fix appears to be to surround tempdir()
and tmp by dQuote( ). This will be in the next release. I'm assuming that
superfluous quotes never hurt. -Frank
---
Frank E Harrell Jr Professor and Chair School of Medicine
Department of Biostatistics Vanderbilt University
More information about the R-help
mailing list