Description Usage Arguments Creating Objects Slots Extends Methods Details Author(s) See Also Examples
Class for spatial attributes that have spatial or
spatio-temporal locations (at least of dimension 2)
that are not on a grid. Direct extension of class
SpatialPointsDataFrame
from the sp-package. See sp2RF
for an explicit
transformation.
1 2 | ## S4 method for signature 'RFspatialPointsDataFrame'
RFspDataFrame2conventional(obj)
|
obj |
an |
Objects can be created by using the functions
RFspatialPointsDataFrame
or
conventional2RFspDataFrame
or by calls of the form
as(x, "RFspatialPointsDataFrame")
, where x
is of class
RFspatialPointsDataFrame
.
.RFparams
:list of 2; .RFparams$n
is the number
of repetitions of the random field contained in the data
slot,
.RFparams$vdim
gives the dimension of the values of the random
field, equals 1 in most cases
data
:object of class
data.frame
,
containing attribute data
coords.nrs
:See SpatialPointsDataFrame
.
coords
:matrix of coordinates (each row is a
point); in case of SpatialPointsDataFrame an object of class
SpatialPoints
is also allowed,
see SpatialPoints.
bbox
:matrix specifying the bounding box
proj4string
:object of class CRS;
projection
Class
SpatialPointsDataFrame
,
directly.
Class SpatialPoints
, by class
SpatialPointsDataFrame
.
Class Spatial
,
by class SpatialPoints
.
signature(obj =
"RFspatialPointsDataFrame")
: generates nice plots
of the random field; if space-time-dim2, a two-dimensional
subspace can be selected using the argument
MARGIN
; to get different slices in a third direction, the
argument MARGIN.slices
can be used;
for more details see plot-method
or type
method?plot("RFspatialPointsDataFrame")
signature(x = "RFspatialPointsDataFrame")
:
uses the show
-method for class
SpatialPointsDataFrame
signature(x = "RFspatialPointsDataFrame")
:
identical to show
-method
signature(obj =
"RFspatialPointsDataFrame")
: conversion to a list of
non-sp-package based objects; the data
-slot
is converted to an array of dimension [1*(vdim>1) +
space-time-dimension + 1*(n>1)]
signature(x = "RFspatialPointsDataFrame")
:
returns the coordinates
signature(x = "RFspatialPointsDataFrame")
: selects
columns of data
-slot; returns an
object of class RFspatialPointsDataFrame
signature(x = "RFspatialPointsDataFrame")
: replaces
columns of data
-slot; returns an
object of class RFspatialPointsDataFrame
signature(x = "RFspatialPointsDataFrame")
:
converts into other formats, only implemented for target class
RFspatialGridDataFrame
signature(...)
: if arguments have identical
topology, combine their attribute values
signature(x = "RFspatialPointsDataFrame")
: returns the range
signature(x = "RFspatialPointsDataFrame")
: plots histogram
signature(x = "RFspatialPointsDataFrame")
:
converts data
-slot to matrix
signature(x = "RFspatialPointsDataFrame")
:
converts data
-slot to array
signature(x = "RFspatialPointsDataFrame")
:
converts data
-slot to vector
signature(x = "RFspatialPointsDataFrame")
:
converts data
-slot and coordinates to a data.frame
Note that in the data
-slot, each column is ordered according to the
ordering of coordinates(grid)
, the first dimension runs fastest
and for all BUT the second dimension, coordinate values are in
ascending order. In the second dimension, coordinate values run from
high to low. Hence, when converting to conventional formats using
RFspDataFrame2conventional
or
RFspDataFrame2dataArray
,
the data array is re-ordered such that all dimensions are in ascending
order. as.matrix
does not perform re-ordering.
Methods summary
and dimensions
are defined for the “parent”-class
RFsp
.
Alexander Malinowski, \martin
RFspatialGridDataFrame-class
, which is for point
locations that are on a grid,
RFpointsDataFrame-class
which is for one-dimensional
locations,
RFsp
,
sp2RF
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | RFoptions(seed=0) ## *ANY* simulation will have the random seed 0; set
## RFoptions(seed=NA) to make them all random again
x <- cbind(runif(50), runif(50))
f <- RFsimulate(model=RMexp(), x=x, n=3)
str(f)
str(RFspDataFrame2conventional(f))
head(coordinates(f))
str(f[2]) ## selects second column of data-slot
all.equal(f, cbind(f,f)[1:3]) ## TRUE
try(as(f, "RFspatialGridDataFrame")) # yields error
plot(f, nmax=2)
f2 <- RFsimulate(model=RMwhittle(nu=1.2, scale=10), x=cbind(x,x), n=4)
plot(f2, MARGIN=c(3,4), nmax=2)
f.sp <- RFsimulate(model=RMexp(), x=x, n=3)
f.old <- RFsimulate(model=RMexp(), x=x, n=3, spConform=FALSE)
all.equal(RFspDataFrame2conventional(f.sp)$data, f.old, check.attributes=FALSE) ## TRUE
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.