Description Usage Arguments Author(s) See Also Examples
If option gc is TRUE, the initialization will have frequent
calls to gc () which can help to avoid swapping or running out of
memory.
1 2 3 |
.Object |
the new |
spc |
the spectra matrix.
|
data |
However, it will usually be more convenient if the spectra are given in
|
wavelength |
The wavelengths corresponding to the columns of
|
labels |
A If |
C.Beleites
new for more information on creating and
initializing S4 objects.
plotmath on expressions for math annotations as
for slot label.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | new ("hyperSpec")
spc <- matrix (rnorm (12), ncol = 4)
new ("hyperSpec", spc = spc)
new ("hyperSpec", data = data.frame (x = letters[1:3]),
spc = spc)
colnames (spc) <- 600:603
new ("hyperSpec", spc = spc) # wavelength taken from colnames (spc)
# given wavelengths precede over colnames of spc
new ("hyperSpec", spc = spc, wavelength = 700:703)
# specifying labels
h <- new ("hyperSpec", spc = spc, data = data.frame (pos = 1 : 3),
label = list (spc = "I / a.u.",
.wavelength = expression (tilde (nu) / cm^-1),
pos = expression ("/" (x, mu*m)))
)
plot (h)
plotc (h, spc ~ pos)
|

Loading required package: lattice
Loading required package: grid
Loading required package: ggplot2
Package hyperSpec, version 0.98-20161118
To get started, try
vignette ("introduction", package = "hyperSpec")
package?hyperSpec
vignette (package = "hyperSpec")
If you use this package please cite it appropriately.
citation("hyperSpec")
will give you the correct reference.
The project homepage is http://hyperspec.r-forge.r-project.org
hyperSpec object
0 spectra
1 data columns
0 data points / spectrum
wavelength: [integer]
data: (0 rows x 1 columns)
1. spc: [matrix0]
hyperSpec object
3 spectra
1 data columns
4 data points / spectrum
wavelength: [integer] 1 2 3 4
data: (3 rows x 1 columns)
1. spc: [matrix4] -0.3458364 -0.6867826 ... -0.253361
hyperSpec object
3 spectra
2 data columns
4 data points / spectrum
wavelength: [integer] 1 2 3 4
data: (3 rows x 2 columns)
1. x: [factor] a b c
2. spc: [matrix4] -0.3458364 -0.6867826 ... -0.253361
hyperSpec object
3 spectra
1 data columns
4 data points / spectrum
wavelength: [numeric] 600 601 602 603
data: (3 rows x 1 columns)
1. spc: [matrix4] -0.3458364 -0.6867826 ... -0.253361
hyperSpec object
3 spectra
1 data columns
4 data points / spectrum
wavelength: [integer] 700 701 702 703
data: (3 rows x 1 columns)
1. spc: [matrix4] -0.3458364 -0.6867826 ... -0.253361
Warning message:
In plotc(h, spc ~ pos) : Intensity at first wavelengh only is used.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.