From: Jim Lemon (bitwrit@ozemail.com.au)
Date: Fri 08 Mar 2002 - 22:09:45 EST
Message-id: <3C889BF8.57083CFA@ozemail.com.au>
Henrik Bengtsson wrote:
> ...I would like to open the default HTML browser (like help.start()
does) to
> show the file. Is it possible to do this (without trying to do a
system
> dependent search for possible browsers)?...
I realize that you're running Windows, but this works for me on Linux,
and might be mangled into shape (sorry, I can't do it on a Linux box).
Jim
help.specific<-function(func=NULL,browser=getOption("browser")) {
Rhome<-system("echo $R_HOME",T)
if(is.null(func)) url<-paste(Rhome,"/doc/html/index.html",sep="",collapse="")
else url<-system(
paste("find ",Rhome," -follow ","-name ",func,".html",sep="",collapse="" ),T)
if(length(url))
system(paste(browser,url," 2>/dev/null &",sep=" "),ignore.stderr = T)
else cat("Can't find an HTML page for function",func,"\n")
}
This archive was generated by hypermail 2.1.3 : Wed 16 Oct 2002 - 11:56:58 EST