Description Usage Arguments Details Value Author(s) References See Also Examples
The gWidgetsWWW package allows gWidgets
scripts to be run
through a web browser. For wider deployment, the package can be
run through the RApache package. To develop scripts and to
run scripts standalone, the local server may be used.
The package uses R's dynamic help web server for the local server. The
main functions are localServerStart
, localServerOpen
and localServerSource
.
1 2 3 4 5 6 7 8 9 10 11 | localServerStart(file = "", port = 8079, package = NULL, ...)
localServerOpen(file, package=NULL, ...)
localServerSource(file_or_url)
gWidgetsWWWIsLocal()
localServerStop()
localServerRestart()
|
file |
Name of file to open. If no |
package |
If specified, files are found reltive to this package through |
file\_or\_url |
A file or url to source in to create the web page. |
port |
Deprected |
... |
passed to constructor |
The calls localServerOpen
and localServerSource
will
start the help system web server if it isn't already started.
Use localServerSource
to download a file from a website to
run. This allows one to distribute scripts quite easily.
There is no way to send information to the browser from the R
console. The browser must initiate the request.
The local server logs error messages in the console.
The functions localServerStop
and
localServerRestart
are deprected.
For localServerStart
, localServerOpen
and localServerSource
a new browser page is opened.
John Verzani
The dynamic help system is well described by Duncan Murdoch and Simon Urbanek here in "The New R Help System." The R Journal, 1(2):60-65, December 2009. The use of a custom handler was derived by work of Romain Francois's highlight package http://romainfrancois.blog.free.fr/.
Rpad where this idea originated.
1 2 3 4 5 | ## Not run:
localServerStart() # opens browser with files in working directory
localServerOpen(file="Examples/ex-index.R", package="gWidgetsWWW")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.