File: conventional2RFspDataFrame.Rd

package info (click to toggle)
r-cran-randomfields 3.3.14-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,916 kB
  • sloc: cpp: 52,159; ansic: 3,015; makefile: 2; sh: 1
file content (56 lines) | stat: -rw-r--r-- 2,074 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
\name{conventional2RFspDataFrame}
\alias{conventional2RFspDataFrame}
\title{Coercion to class 'RFsp' objects}

\description{
 Generate an object of class \code{\link[=RFsp-class]{RFsp}} from conventional objects.
}

\usage{
conventional2RFspDataFrame(data, coords=NULL, gridTopology=NULL, n=1,
                           vdim=1, T=NULL, vdim_close_together)
}

\arguments{
  \item{data}{array; of dimension \code{c(vdim, space-time-dim, n)};
    contains the values of the random field}
  \item{coords}{matrix of coordinates}
  \item{gridTopology}{3-row-matrix or of class \code{\link[sp:GridTopology-class]{GridTopology}}; specifies
    the grid vectors; either
    \code{coords} or \code{gridTopology} must be \code{NULL}}
  \item{n}{number of iid copies of the random field, default is 1}
  \item{vdim}{number of dimensions of the values of the random field,
    default is 1}
  \item{T}{time component if any. The length of the temporal grid
    is needed by \command{as.array} if the spatial locations are randomly
    scattered. 
  }
  \item{vdim_close_together}{
    logical. Currently, only \code{vdim_close_together=FALSE}
    is coded. In this case the dimensions of the data follow the order
    \dQuote{locations, multivariate, repeated}.
    Otherwise \dQuote{multivariate, locations, repeated}.
  }
}

%\details{}

\value{Object of class
 \command{\link[=RFspatialGridDataFrame-class]{RFspatialGridDataFrame}},
 \command{\link[=RFspatialPointsDataFrame-class]{RFspatialPointsDataFrame}},
 \command{\link[=RFgridDataFrame-class]{RFgridDataFrame}} or
 \command{\link[=RFpointsDataFrame-class]{RFpointsDataFrame}}.
}

\author{Alexander Malinowski, \martin}

\examples{\dontshow{StartExample(reduced=50)}
RFoptions(seed=0) ## *ANY* simulation will have the random seed 0; set
##                   RFoptions(seed=NA) to make them all random again
x <- 1:20
z <- RFsimulate(RMexp(), x, spConform=FALSE)
z2 <- conventional2RFspDataFrame(z, coord=x)
Print(z, z2)
\dontshow{FinalizeExample()}}

\keyword{spatial}