On Mon, 2010-11-22 at 23:31 -0800, Stephen Liu wrote: > Hi David, > > I see. File: gives the full path to the .html file created/download. Then > the > browser will open that file. Thanks. > > I don't have hwriter package installed. > > A side question, what will be the corresponding command on R for check > whether a > package already installed? > > similar to; > On R (Windows) > Packages - Load package
No, that is a work around that gives the answer you want in a rather round-about way. As far as I can see, there isn't one, but it is easy to cook up: isInstalled <- function(pkg, lib.loc = NULL) { stopifnot(is.character(pkg)) pkgs <- installed.packages(lib.loc = lib.loc) pkg %in% pkgs } G > B.R. > Stephen L > > > > ----- Original Message ---- > From: David Scott <d.sc...@auckland.ac.nz> > To: Stephen Liu <sati...@yahoo.com> > Cc: Ista Zahn <iz...@psych.rochester.edu>; "r-help@r-project.org" > <r-help@r-project.org> > Sent: Tue, November 23, 2010 12:00:36 PM > Subject: Re: [R] How to start default browser on R > > On 23/11/10 16:59, Stephen Liu wrote: > > Hi Ista, > > > > I see. Your advice works. Thanks > > > > even without: > > browser="C:/Program Files/Internet Explorer/iexplore.exe") > > > > For non default browser it needs; > > browser="C:/Program Files/Mozilla Firefoe/firefox.exe" > > > > > > What will be "file:" used for? > > > > > > B.R. > > Stephen L > > > You can use it to open a local file on your machine as well. I use this > all the time with hwriter which writes html reports. > > David Scott > -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Dr. Gavin Simpson [t] +44 (0)20 7679 0522 ECRC, UCL Geography, [f] +44 (0)20 7679 0565 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/ UK. WC1E 6BT. [w] http://www.freshwaters.org.uk %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% ______________________________________________ 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.