View source: R/gen_coreDataManip.r
do_blowup | R Documentation |
Use random observations of the provided dataset (within a possible grouping), calculate their average and add the resulting spectrum as new observation to the dataset.
do_blowup(
dataset,
grp = NULL,
tn = "x10",
an = "100%",
cst = TRUE,
conf = TRUE,
pred = TRUE,
replace = TRUE
)
dataset |
An object of class 'aquap_data' as produced e.g. by
|
grp |
Character. One ore more valid class-variable names that should be
used to from subgroups within the dataset. Similar to the |
tn |
Numeric or character length one. If numeric, |
an |
Numeric or character length one. If numeric, |
cst |
Logical. If consecutive scans should always be kept together. NOT YET IMPLEMENTED - value is ignored, and consec. scans are NOT kept together. |
conf |
Logical. If numbers should be presented and confirmation requested before commencing the actual calculations. |
pred |
Logical. If an estimation of the number of identical spectra should
be made. Only presented if |
replace |
Logical. If the sample drawing should be done with replacement. Recommended value is TRUE. |
The random observations are sampled with replacement. The provenience of each observation is marked in an additional column in the header named 'blowup', where the character 'orig' denotes an original observation, while the character 'artif' is marking an artificially generated observation.
The dataset with increased numbers of observations.
Do take care of a correct grouping, otherwise the inclusion of observations into the same group that do not belong together will destroy any information.
Other Data pre-treatment functions:
[,aquap_data-method
,
do_addNoise()
,
do_avg()
,
do_detrend()
,
do_emsc()
,
do_gapDer()
,
do_msc()
,
do_resampleNIR()
,
do_sgolay()
,
dpt_modules
,
selectWls()
,
ssc()
## Not run:
fd <- gfd()
fdPlus <- do_blowup(fd, tn="x4", an=4)
fdPlus <- do_blowup(fd, tn="x8", an="10%", grp=c("C_Foo", "C_Bar"))
fdPlus <- do_blowup(fd, tn=1000, an=5)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.