db.create {RGeostats}R Documentation

Create a standard Data Base


Create a standard db-class and define its type (Grid or Point)


db.create(..., flag.grid = FALSE, nx = NA, x0 = NA, dx = NA,
nech = NA, angles=NA, ndim = NA, nvar = NA, autoname = TRUE)



Set of vectors to be added to the db-class after its creation.


if TRUE, the db-class is a Grid. The user must then define the parameters necessary for its complete definition along all axes. If FALSE, the db-class is a set of Points. The user must provide the explicitely the number of samples which must match the size of any vector.

Note that this flag is set to TRUE automatically as soon as the argument 'nx' is defined.


A vector of the number of grid meshes. The number of items in this argument gives the dimension of the space.


A vector defining the origin of the grid (lower left corner). If absent, the defaulted origin corresponds to the point with all coordinates equal to 0.


A vector defining the mesh of the grid. If absent, the defaulted mesh corresponds to a vector with all components equal to 1.


Number of samples. In the case of a Grid, this parameter is calculated automatically as the number of grid nodes.


Array giving the rotation angles (only for dimension 2 or 3). The first angle corresponds to the rotation around OZ axis, the second to a rotation around OY'and the third one around Ox". The dimension of this array cannot exceed the space dimension.


Space dimension. In the case of Grid, this parameter is calculated as the length of the vectors defining the origin, the mesh and the number of meshes.


Number of variables.


When set to TRUE, the locators are defined from the names of the variables. Otherwise, the first 'ndim' variables are considered as coordinates (locator 'x'), the 'nvar' next variables are considered as target variable (locator 'z').


The '...' argument may consist in a series of variables, possibly with names.

If the Db corresponds to a Grid, samples are ordered as described in the 'Details' section of db-class.


The new db-class.

See Also



# Creating a Db for a set of isolated points in 2-D
db1 <- db.create(x1=c(1,2,3),x2=c(2,3,4),z1=c(10,20,30))

# Creating a Db from a list for a set of isolated points in 1-D
db2 <- db.create(list(x1=seq(0,10)))

# Creating a Db organized as a 3-D grid 
db3 <- db.create(flag.grid=TRUE,x0=c(0,0,0),dx=c(1,1,0.5),nx=c(12,15,21))

# Clean up

[Package RGeostats version 11.0.6 Index]