| GeoNA | R Documentation |
The function deletes NA values from a spatial or spatio-temporal dataset
GeoNA(data, coordx = NULL, coordy=NULL,coordz=NULL, coordt=NULL,
coordx_dyn=NULL, grid=FALSE, X=NULL, setting="spatial")
data |
A |
coordx |
A numeric ( |
coordy |
A numeric vector giving 1-dimension of
spatial coordinates; Optional argument, the default is |
coordz |
A numeric vector giving 1-dimension of
spatial coordinates; Optional argument, the default is |
coordt |
A numeric vector giving one dimension of temporal coordinates; the default is |
coordx_dyn |
For dynamic locations, a list with one two- or three-column coordinate matrix per time. It must be aligned with the list |
grid |
Logical; if |
X |
Covariates aligned with |
setting |
String; are data spatial, spatio-temporal or spatial bivariate
(respectively |
Returns a list containing the following components:
coordx |
A |
coordy |
A |
coordt |
A |
data |
The data without NAvalues |
grid |
|
perc |
The percentage of NA values. |
setting |
Are data of spatial or spatio-temporal or spatial bivariate type |
X |
The covariate matrix after deleting the rows corresponding to removed observations. For fixed-coordinate spatio-temporal data, deleting a site removes its row from every temporal block. |
For fixed sites, data has times in rows and sites in columns; rows of
X follow time-major order. Removing a site removes the corresponding
column of data, coordinate row, and its row from every temporal block
of X. For dynamic sites, data, coordx_dyn, and
X are aligned lists and missing values are removed independently
within each temporal block. See GeoModels-spacetime-ordering.
Moreno Bevilacqua, moreno.bevilacqua89@gmail.com,https://sites.google.com/view/moreno-bevilacqua/home, Víctor Morales Oñate, victor.morales@uv.cl, https://sites.google.com/site/moralesonatevictor/, Christian Caamaño-Carrillo, chcaaman@ubiobio.cl,https://www.researchgate.net/profile/Christian-Caamano
library(GeoModels)
# Define the spatial-coordinates of the points:
set.seed(79)
x = runif(200, 0, 1)
y = runif(200, 0, 1)
coords=cbind(x,y)
# Set the exponential cov parameters:
corrmodel = "Matern"
mean=0
sill=1
nugget=0
scale=0.3/3
smooth=0.5
param=list(mean=mean,sill=sill,nugget=nugget,scale=scale,smooth=smooth)
# Simulation of the spatial Gaussian random field:
data = GeoSim(coordx=coords, corrmodel=corrmodel,
param=param)$data
data[1:100]=NA
# removing NA
a=GeoNA(data,coordx=coords)
a$perc # percentage of NA values
#a$coordx# spatial coordinates without missing values
#a$data # data without missinng values
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.