Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

RFgridDataFrame-class

Class RFgridDataFrame


Description

Class for attributes in one-dimensional space.

Usage

## S4 method for signature 'RFgridDataFrame'
RFspDataFrame2conventional(obj, data.frame=FALSE)

Arguments

obj

an RFgridDataFrame object

data.frame

logical. If TRUE a data.frame is returned.

Creating Objects

Objects can be created by using the functions RFgridDataFrame or conventional2RFspDataFrame or by calls of the form as(x, "RFgridDataFrame"), where x is of class RFgridDataFrame.

Slots

.RFparams:

list of up to 5 elements;

  • n is the number of repetitions of the random field contained in the data slot

  • vdim gives the dimension of the values of the random field, equals 1 in most cases

  • has.variance indicates whether information on the variance is available,

  • coordunits gives the names of the units for the coordinates

  • varunits gives the names of the units for the variables

data:

object of class data.frame, containing attribute data

grid:

object of class GridTopology.

Methods

plot

signature(obj = "RFgridDataFrame"): 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("RFgridDataFrame")

show

signature(x = "RFgridDataFrame"): uses the show-method for class SpatialGridDataFrame.

print

signature(x = "RFgridDataFrame"): identical to show-method

RFspDataFrame2conventional

signature(obj = "RFgridDataFrame"): 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)]

coordinates

signature(x = "RFgridDataFrame"): returns the coordinates

[

signature(x = "RFgridDataFrame"): selects columns of data-slot; returns an object of class RFgridDataFrame.

[<-

signature(x = "RFgridDataFrame"): replaces columns of data-slot; returns an object of class RFgridDataFrame.

as

signature(x = "RFgridDataFrame"): converts into other formats, only implemented for target class RFpointsDataFrame

cbind

signature(...): if arguments have identical topology, combine their attribute values

range

signature(x = "RFgridDataFrame"): returns the range

hist

signature(x = "RFgridDataFrame"): plots histogram

as.matrix

signature(x = "RFgridDataFrame"): converts data-slot to matrix

as.array

signature(x = "RFgridDataFrame"): converts data-slot to array

as.vector

signature(x = "RFgridDataFrame"): converts data-slot to vector

as.data.frame

signature(x = "RFgridDataFrame"): converts data-slot and coordinates to a data.frame

Details

Methods summary and dimensions are defined for the “parent”-class RFsp.

Author(s)

See Also

RFspatialGridDataFrame, which is for point locations in higher dimensional spaces, RFpointsDataFrame-class which is for one-dimensional arbitrary locations, RFsp

Examples

RFoptions(seed=0) ## *ANY* simulation will have the random seed 0; set
##                   RFoptions(seed=NA) to make them all random again

x <- seq(0,10,length=100)
f <- RFsimulate(model=RMgauss(), 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

plot(f, nmax=2)

RandomFields

Simulation and Analysis of Random Fields

v3.3.10
GPL (>= 3)
Authors
Martin Schlather [aut, cre], Alexander Malinowski [aut], Marco Oesting [aut], Daphne Boecker [aut], Kirstin Strokorb [aut], Sebastian Engelke [aut], Johannes Martini [aut], Felix Ballani [aut], Olga Moreva [aut], Jonas Auel[ctr], Peter Menck [ctr], Sebastian Gross [ctr], Ulrike Ober [ctb], Paulo Ribeiro [ctb], Brian D. Ripley [ctb], Richard Singleton [ctb], Ben Pfaff [ctb], R Core Team [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.