I'm new to R, and using version 1.8.0 on Windows XP, under emacs/ess. I'm trying to test some simple output flow using functions in the Hmisc package and hit an error that may be a more general problem than just my specific situation. If I issue the command latex(describe(mtcars), file = ??) I get what looks like good TeX code output to the console. However, if I issue the command dvips(latex(describe(mtcars)),file="friday.ps") I get the following error: Error in system(cmd, intern = intern, wait = wait | intern, show.output.on.console = wait, : C:/Documents not found and I don't find any postscript output file. I'm guessing the "C:/Documents" reference is actually a problem with something dealing with paths with embedded spaces and that it's failing to deal with a path like C:/Documents and Settings/.... What I've been unable to figure out is what file reference it's hiccuping on, so that I can hopefully find a workaround. I tried several things without any change in behavior: - insuring that the working directory for R didn't have any spaces in the pathname. - changing my TEMP and TMP environment variables to paths without any spaces. - in the possibility that some piece of software (emacs, R, LaTex) was looking for the TMPDIR environment variable, tried setting that to a path without any spaces. Any ideas, suggestions for further experiments, or solutions would be welcome! A copy of any reply to my email address (as well as just posting to the list) would be appreciated. Thank you - David Kelly
Prof Brian Ripley
2003-Nov-24 10:53 UTC
[R] dvips function gives "Documents not found" error
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. On Sun, 23 Nov 2003, David Kelly wrote:> I'm new to R, and using version 1.8.0 on Windows XP, under emacs/ess. > I'm trying to test some simple output flow using functions in the Hmisc > package and hit an error that may be a more general problem than just my > specific situation. > > If I issue the command > latex(describe(mtcars), file = ??) > I get what looks like good TeX code output to the console. > > However, if I issue the command > dvips(latex(describe(mtcars)),file="friday.ps") > > I get the following error: > Error in system(cmd, intern = intern, wait = wait | intern, > show.output.on.console = wait, : > C:/Documents not found > > and I don't find any postscript output file. > > I'm guessing the "C:/Documents" reference is actually a problem with > something dealing with paths with embedded spaces and that it's failing > to deal with a path like C:/Documents and Settings/.... > > What I've been unable to figure out is what file reference it's > hiccuping on, so that I can hopefully find a workaround. I tried > several things without any change in behavior: > - insuring that the working directory for R didn't have any spaces in > the pathname. > - changing my TEMP and TMP environment variables to paths without any > spaces. > - in the possibility that some piece of software (emacs, R, LaTex) was > looking for the TMPDIR environment variable, tried setting that to a > path without any spaces. > > Any ideas, suggestions for further experiments, or solutions would be > welcome! A copy of any reply to my email address (as well as just > posting to the list) would be appreciated. > > Thank you - > David Kelly > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Possibly Parallel Threads
- using dvi with latex object: directory not correctly set, maybe due to error in shQuote()
- how to plot a graph with different pch
- How to add points to two plots parallelly ?
- suggestion: "." in [lsv]apply()
- Ggplot barchart drops factor levels: how to show them with zero counts?