Description Usage Arguments Details Value Author(s) Examples
View source: R/summaryPlumes.R
This function is similar to apply
for the values
of Simulations
plume-wise. It takes a function and returns a vector with a value for each plume: the result of the function applied to all values belonging to this plume. As values
may be too big to keep in memory, the function is applied chunk-wise; therefore it only works for associative functions. A (slower) method without this restriction is
It is combined with a global summary function and thus provides a general basic form of a cost function.
1 2 3 4 5 6 7 | summaryPlumes(simulations,
locations = 1:nLocations(simulations),
plumes = 1:nPlumes(simulations),
kinds = 1,
fun, summaryFun = weightedMean,
weight = 1, na.rm = FALSE, ...)
weightedMean(x, weight, na.rm = FALSE)
|
simulations |
|
locations |
indices of |
plumes |
indices of |
kinds |
index of kind of |
fun |
|
summaryFun |
|
weight |
to be used by |
na.rm |
|
... |
further arguments to be forwarded to |
x |
vector |
To use a different summaryFun
you may use replaceDefault
with
kind = "summaryFun.summaryPlumes"
to check the function beforehand or to generate it by resetting the default parameters of an existing function.
A list
of
summary |
the result of |
summaryPlumes |
the plume-wise results of |
Kristina B. Helle, kristina.helle@uni-muenster.de
1 2 3 4 5 6 7 8 9 10 | data(radioactivePlumes)
# sample of locations, e.g. proposed sensor set
locSample = sample.int(nLocations(radioactivePlumes), 10)
# plume detection
# (number of plumes not detected at any of locSample at a level of more than 1e-7)
plumeMin_radioactivePlumes =
summaryPlumes(radioactivePlumes, locations = locSample, kinds = 2,
fun = "min",
summaryFun = function(x, weight = 1, na.rm = TRUE){sum(x < 1e-7)})
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.