| Extract.fv {spatstat.explore} | R Documentation |
Extract or Replace Subset of Function Values
Description
Extract or replace a subset of an object of class "fv".
Usage
## S3 method for class 'fv'
x[i, j, ..., drop=FALSE]
## S3 replacement method for class 'fv'
x[i, j] <- value
## S3 replacement method for class 'fv'
x$name <- value
Arguments
x |
a function value object,
of class |
i |
any appropriate subset index.
Selects a subset of the rows of the data frame, i.e.
a subset of the domain of the function(s) represented by |
j |
any appropriate subset index for the columns of the data frame.
Selects some of the functions present in |
name |
the name of a column of the data frame. |
... |
Ignored. |
drop |
Logical. If |
value |
Replacement value for the column or columns selected by
|
Details
These functions extract a designated subset of an object of class
"fv", or replace the designated subset with other data,
or delete the designated subset.
The subset is specified by the
row index i and column index j, or
by the column name name. Either i or j
may be missing, or both may be missing.
The function [.fv is a method for the generic operator
[ for the class "fv". It extracts the
designated subset of x, and returns it as
another object of class "fv" (if drop=FALSE)
or as a data frame or vector (if drop=TRUE).
The function [<-.fv is a method for the generic operator
[<- for the class "fv".
If value is NULL, the designated subset of x will be
deleted from x.
Otherwise, the designated subset of x will be
replaced by the data contained in value.
The return value is the modified object x.
The function $<-.fv is a method for the generic operator
$<- for the class "fv".
If value is NULL, the designated column of x will be
deleted from x.
Otherwise, the designated column of x will be
replaced by the data contained in value.
The return value is the modified object x.
Value
The result of [.fv with drop=TRUE
is a data frame or vector.
Otherwise, the result is another object of class "fv".
Author(s)
Adrian Baddeley Adrian.Baddeley@curtin.edu.au and Rolf Turner rolfturner@posteo.net
See Also
Examples
K <- Kest(cells)
# discard the estimates of K(r) for r > 0.1
Ksub <- K[K$r <= 0.1, ]
# extract the border method estimates
bor <- K[ , "border", drop=TRUE]
# or equivalently
bor <- K$border
# remove the border-method estimates
K$border <- NULL
K