plotSpectraJS(spectra, which = NULL, browser = NULL, minify = TRUE)
An object of S3 class
Integer. If not
NULL, specifies by number which spectra to plot.
If greater control is needed, use
removeSample which is more flexible
before calling this function.
Character. Something that will make sense to your OS. Only
necessary if you want to override your system specified browser as
R. See below for further details.
performance. However, it requires package
js which in turn requires
V8. The latter is not available on all platforms. Details
may be available at https://github.com/jeroen/V8
None; side effect is an interactive web page. The temporary directory containing the files that drive the web page is written to the console in case you wish to use those files. This directory is deleted when you quit R. If you wish to read the file, don't minify the code, it will be unreadable.
The spectral data are incorporated into the web page. Keep in mind that very large
data sets, like NMR spectra with 32K points, will bog down the browser.
In these cases, you may need to limit the number of samples in passed to this function.
removeSample or use argument
The browser is called by
in turn uses
options("browser"). Exactly how this is handled
is OS dependent.
If browser is
NULL, you are using RStudio, and a
viewer is specified, this will be called. You can stop this by with
options(viewer = NULL).
On a Mac, the default browser is called
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.
You can check the performance of your browser at peacekeeper.futuremark.com The most relevant score is the rendering category.