On 12/7/2010 9:35 PM, Yihui Xie wrote:
shell(paste("yap", "C:/WINDOWS/TEMP/Rtmpz0QkT8/file311f289a.dvi"))
I can confirm that using shell() directly on the .dvi file generated by
latex() works, while system() does not -- it hangs
as before.
However, Yihui's patch, in this form still hangs, so maybe there is
something else going on here.
`show.dvi` <-
function (object, width = 5.5, height = 7)
{
viewer <- optionsCmds("xdvi")
cmd <- if (viewer == "yap") {
paste(viewer, object$file)
}
else if (viewer == "kdvi") {
paste(viewer, object$file)
}
else if (viewer == "xdvi") {
paste(viewer, " -paper ", width, "x", height, "in -s 0 ",
object$file, sep = "")
}
else {
paste(viewer, object$file)
}
if (.Platform$OS.type == 'windows') system = shell
system(cmd, intern = TRUE, wait = TRUE)
invisible(NULL)
}
environment(show.dvi) <- environment(latex)
--
Michael Friendly Email: friendly AT yorku DOT ca
Professor, Psychology Dept.
York University Voice: 416 736-5115 x66249 Fax: 416 736-5814
4700 Keele Street Web: http://www.datavis.ca
Toronto, ONT M3J 1P3 CANADA
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.