Empty produces an hyperSpec
object with the same columns and wavelengths
as x
. The new object will either contain no rows at all (default), or the
given number of rows with all data initialized to spc
and extra
,
respectively.
empty(x, nrow = 0, spc = NA, extra = NA)
x | hyperSpec object |
---|---|
nrow | number of rows the new object should have |
spc | value to initialize the new spectra matrix with |
extra | value to initialize the new extra data with |
C. Beleites
empty(faux_cell, nrow = 2, spc = 0)#> hyperSpec object #> 2 spectra #> 4 data columns #> 300 data points / spectrum #> wavelength: Delta * tilde(nu)/cm^-1 [numeric] 602 606 ... 1798 #> data: (2 rows x 4 columns) #> 1. x: x position [logical] NA NA + NA #> 2. y: y position [logical] NA NA + NA #> 3. region: [logical] NA NA + NA #> 4. spc: intensity (arbitrary units) [matrix, array300] 0 0 ... 0