Description Usage Arguments Details Value Author(s) Examples
Return subsets of Simulations
, subsetting by plumes
, locations
, the kinds of values
or by the columns of data associated with plumes
or locations
– possibly combined.
1 2 3 |
x |
|
... |
parameters to be forwarded |
locations |
indices of |
plumes |
indices of |
kinds |
indices of kinds of |
dataLocations |
indices of the data associated with the |
dataPlumes |
indices of the data associated with the |
nameSave |
name for saving the new |
overwrite |
|
valuesOnly |
|
Multiple or invalid values in locations
and plumes
are ignored, only the order is taken into account. (Because in SpatialIndexDataFrame
and SpatialPolygridDataFrame
no locations can be selected multiply.)
However, if valuesOnly = TRUE
, multiplity is taken into account and invalid indices result in NA
values. In this case only the values
are returned.
A Simulations
object, subsetted by the given indices: subsetting locations
or plumes
results in subsetting of the values
. If the resulting raster is too big to keep in memory, it is saved.
If valuesOnly = TRUE
, only the new values
are returned, i.e. a raster
object.
Kristina B. Helle, kristina.helle@uni-muenster.de
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ## Not run:
## may create files
data(SimulationsSmall)
SimulationsSmall_a = subset(SimulationsSmall, locations = c(2,4,6,8))
SimulationsSmall_b = subset(SimulationsSmall,
locations = 1:5, plumes = c(2,4), kinds = 1,
dataPlumes = 1:2)
# effect of 'valuesOnly'
data(radioactivePlumes)
locations1 = sample(nLocations(radioactivePlumes), 15)
plumes1 = sample(nPlumes(radioactivePlumes), 15)
subset_fm_RNA = subset(radioactivePlumes,
plumes = c(plumes1, NA, 10000, NA, 0, plumes1),
locations = c(locations1, NA, 10000, NA, 0,locations1))
subset_mf_RNA_vO = subset(radioactivePlumes,
plumes = c(plumes1, NA, 0, 10000, NA, plumes1),
locations = c(locations1, NA, NA, 10000, 0, 0, locations1),
valuesOnly = TRUE)
image(subset_fm_RNA@values)
image(subset_mf_RNA_vO) # with repetitions
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.