Spectra
object interactively. This is most useful for data exploration. For high quality plots, consider plotSpectra
.
plotSpectraJS(spectra, browser = NULL, minify = TRUE)
Spectra
to be checked.
R
. See below for further details.
js
which in turn requires package V8
. The latter is not available on all platforms. Details may be available at https://github.com/jeroenooms/v8
browseURL
, which
in turn uses options("browser")
. Exactly how this is handled
is OS dependent.NULL
, you are using RStudio, and a viewer is specified, the viewer will be called instead of a browser. You can stop this by with options(viewer = NULL)
./bin/sh/open
which in turn looks at which browser you have set in the system settings. You can
override your default with
browser = "/usr/bin/open -a 'Google Chrome'"
for example.
Testing shows that on a Mac, Safari and Chrome perform correctly,
but in Firefox the mouse cursor is slightly offset from the guides. While it
doesn't look quite right, the value of the cursor displayed is correct.plotSpectraJS
has been tested
on a Windows 7
professional instance running in VirtualBox using Firefox and Chrome, and
runs correctly (Firefox has the same mouse position issue as mentioned above).removeSample
so that only the spectra you need to view are passed to the web page.plotSpectra
for non-interactive plotting.
if (interactive()) {
require("jsonlite")
require("js")
data(metMUD2)
plotSpectraJS(metMUD2)
}
Run the code above in your browser using DataLab