Reads data from a ASCII file and converts it to an object of the
class
geodata
, the standard data format for the
geoR package.
read.geodata(file, header = FALSE, coords.col = 1:2, data.col = 3,
data.names = NULL, covar.col = NULL, covar.names = "header",
units.m.col = NULL, realisations = NULL,
na.action = c("ifany", "ifdata", "ifcovar", "none"),
rep.data.action, rep.covar.action, rep.units.action, …)
a string with the name of the ASCII file.
logical. Indicates whether the variables names should be read from the first line of the input file.
a vector with the numbers of the columns containing the coordinates.
a scalar or vector with the number of the column(s) containing the data.
a string or vector of strings with names for the data columns. Only valid if there is more than one column of data. By default the names in the original object are used.
optional. A scalar or vector with the number of the column(s) with the values of the covariate(s).
optional. A vector with the names of the the covariates. By default the names in the original object are used.
optional. A scalar with the column number corresponding to the offset variable. Alternativelly can be a character vector with the name of the offset. This option is particularly relevant when using the package geoRglm.
optional. A vector indicating the replication
number. For more details see documentation for
as.geodata
.
a string. Defines action to be taken in the presence of
NA
's. For more details see documentation for
as.geodata
.
a string or a function. Defines action to be taken when there is more than
one data at the same location. For more details see documentation for
as.geodata
.
a string or a function. Defines action to be taken when there is more than
one covariate at the same location. For more details see documentation for
as.geodata
.
a string or a function.
Defines action to be taken on the element units.m
, if present
when there is more than
one data at the same location. The default option is the same
value set for rep.data.action
.
further arguments to be passed to the function read.table
.
An object of the class
geodata
.
See documentation for the function as.geodata
for
further details.
The function read.table
is used to read the data from the
ASCII file and then as.geodata
is used to convert
to an object of the class
geodata
.
Further information on the package geoR can be found at: http://www.leg.ufpr.br/geoR.
as.geodata
to convert existing R objects,
read.table
, the basic R function used to read ASCII files,
and list
for detailed information about lists.