[R] Re: ...specific file in the HTML browser...

Jim Lemon bitwrit at ozemail.com.au
Fri Mar 8 12:09:45 CET 2002

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
> 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).


-------------- next part --------------
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)
  system(paste(browser,url," 2>/dev/null &",sep=" "),ignore.stderr = T)
 else cat("Can't find an HTML page for function",func,"\n")

More information about the R-help mailing list