[,aquap_data-method | R Documentation |
Available methods for objects of class 'aquap_data', used for subtractions, subscripting etc. of datasets.
## S4 method for signature 'aquap_data'
x[i]
## S4 replacement method for signature 'aquap_mergeLabels'
x[i, j] <- value
## S4 replacement method for signature 'aquap_mergeLabels'
x$name <- value
## S4 method for signature 'aquap_data,aquap_data'
e1 - e2
## S4 method for signature 'aquap_data,aquap_data'
e1 / e2
x |
An object of class 'aquap_data' |
i |
Subsricpting indices for rows |
j |
Subsricpting indices for columns |
value |
An R object |
name |
A valid column name |
e1 |
Object of class 'aquap_data' |
e2 |
Object of class 'aquap_data' |
For subscripting via '[]'
, only values
for rownumbers are accepted.
Use the subtraction via '-'
to subtract the
NIR-data in datasets that have the same structure, i.e. the same header, and
possibly same wavelengths in the NIR. You can either subtract two equally long
datasets, i.e. two datasets having the exactly same number of rows, or you can
subtract a dataset having exactly one row from a full dataset. The latter can
be useful for e.g. subtracting the averaged spectra of a single class from the
complete dataset - see examples. If parameter
gen_calc_allowSubtrDiffWavels
in the settings.r file is set to TRUE, it
is also possible to subtract two datasets that do not have the same
number of wavelengths. This can e.g. happen ater the usage of
do_gapDer
. In this case, the bigger dataset, i.e. the dataset
having more wavelengths, is cut down to match exactly the wavelength-range of
the smaller dataset. In other words, the return in this case is a dataset having
only the number of wavelengths as 'dictated' by the smaller dataset.
Use the division via '/' to divide a first, complete
dataset by a dataset containing only a single wavelength in the NIR data.
Please see siWl
for generating such a dataset.
Can be used to modify the values to be filled in the new variables when merging datasets. Only values for columns are accepted.
Can be used do modify the values to be filled in the new variables when merging datasets.
drop
is always set to FALSE
for subsrictping via
'[]'
.
Other Data pre-treatment functions:
do_addNoise()
,
do_avg()
,
do_blowup()
,
do_detrend()
,
do_emsc()
,
do_gapDer()
,
do_msc()
,
do_resampleNIR()
,
do_sgolay()
,
dpt_modules
,
selectWls()
,
ssc()
Other dataset modification functions:
calculateVariable()
,
combineVariable()
,
generateMergeLabels,aquap_data,aquap_data,character,character-method
,
mergeDatasets,aquap_data,aquap_data,missing-method
## Not run:
dataset <- gfd()
ds <- dataset[1:5,]
ds <- dataset[1:5] # the same as above
dSub <- dataset - do_sgolay(dataset, n=71) # apply smoothing and subtract
plot(dSub, pg.where="", pg.main=" | smoothed subtracted")
plot(do_gapDer(ds,1,11,13,1) - do_gapDer(ds, 1, 13, 13, 1))
###
plot(dataset)
plot(dataset / siWl(dataset, 1450))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.