class "geodata".
Objects of the class "geodata" are lists with two obligatory
components: coords and data.
Optional components are allowed and a typical example is a vector or
matrix with covariate(s) value(s).as.geodata(obj, coords.col = 1:2, data.col = 3, data.names = NULL,
covar.col = NULL, covar.names = "obj.names",
realisations = NULL,
na.action = c("ifany", "ifdata", "ifcovar", "none"),
rep.data.action, rep.covar.action)is.geodata(x)
obj with the
realisation indicator variable.
See DETAILS below.NA's. The default option "ifany" excludes all points
for which there are NA's in the data or covariates. The option "ifdata" excludes points
"none"
keeps the repeated locations, if any. The option "first" retains
only the first data rep.data.locations, to be applied to
the covariates, if any. Defaults to
the same option set for rep.data.locations.geodata.class "geodata" which is a list
with two obligatory components (coords and data)
and other optional components:"geodata" contain data for
geostatistical analysis using the package NA's are not allowed in the coordinates. By default the
respective rows will not be included in the output. Realisations
Tipically geostatistical data correspond to a unique realisation of
the spatial process.
However, sometimes different "realisations" are possible.
For instance, if data are collected in the same area at different
points in time and independence between time points is assumed,
each time can be considered a different "replicate" or "realisation"
of the same process. The argument realisations takes a vector
indication the replication number and can be passed to other likfit.
The data format is similar to the usual geodata format in
grf objects
If an object of the class grf is provided the functions just
extracts the elements coords and data of this object.
read.geodata for reading data from an
ASCII file and list for general information on lists.## converting the data-set "topo" from the package spatial (VR's bundle)
## to the geodata format:
require(spatial)
data(topo)
topo
topogeo <- as.geodata(topo)
names(topogeo)
topogeoRun the code above in your browser using DataLab