subset_Grid | R Documentation |
Subgrid by selection of levels in one dimension.
subset_Grid(X, subset, type = c("index", "Grid", "both"), drop = TRUE)
X |
An object with class |
subset |
An expression concerning one of the dimension of |
type |
The wanted type of result. When |
drop |
Logical. If |
A vector of integer indices, a Grid
object or a list
embedding these two elements, depending on the value of type
.
The new Grid
returned (if any) uses consecutive
numbers for the nodes between 1
and the number of new nodes. So it
no longer keeps trace of the nodes position in X
. However
the surviving nodes are kept in the order that they had in
X
.
When a response vector or matrix say Y
is related to the
original grid X
, the index vector returned by
subgrid
can be used to select the corresponding responses.
The subset
method.
myGD <- Grid(levels = list("Temp" = c(250, 260, 280, 290, 300),
"Press" = c(3, 4, 6, 10)))
myGD2 <- subset_Grid(myGD, subset = Temp > 280)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.