Learn R Programming

RandomFields (version 3.0.10)

conventional2RFspDataFrame: Coercion to class 'RFsp' objects

Description

Generate an object of class RFsp from conventional objects

Usage

conventional2RFspDataFrame(data, coords=NULL, gridTopology=NULL, n=1,
vdim=1)

Arguments

data
array; of dimension c(vdim, space-time-dim, n); contains the values of the random fields
coords
matrix of coordinates
gridTopology
3-row-matrix or of class GridTopology; specifies the grid vectors; either coords or gridTopology must be NULL
n
number of iid copies of the random fields, default is 1
vdim
number of dimensions of the values of the random field, default is 1

Value

Examples

Run this code
RFoptions(seed=0)
x <- 1:20
z <- RFsimulate(RMexp(), x, spC=FALSE)
z2 <- conventional2RFspDataFrame(z, coord=x)
Print(z, z2)
RFoptions(seed=NA)

Run the code above in your browser using DataLab