db-class {RGeoS} | R Documentation |
A structure has been developped to capture any type of information that is passed as an input data or used as an output result.
Objects can be created by calls of the form new("db", ...)
.
They mainly correspond either to a set of individual points to an organized grid. The number of space dimensions is not limited. The number of variables is not limited.
flag.grid
:Object of class "logical"
Is set to TRUE if the file contains a grid and to FALSE otherwise
ndim
:Object of class "numeric"
Space dimension
x0
:Object of class "numeric"
Vector containing the coordinates of the lower corner of the grid. These parameters are only used when the data is organized as a grid (flag.grid=TRUE).
dx
:Object of class "numeric"
Vector containing the mesh of the grid. These parameters are only used when the data is organized as a grid (flag.grid=TRUE).
nx
:Object of class "numeric"
Vector containing the number of meshes for the grid. These parameters are only used when the data is organized as a grid (flag.grid=TRUE).
locators
:Object of class "character"
The locators provide a set of nicknames to each field of the data frame. These nicknames are used for the program to default variables to calling functions. These nicknames must belong to the following list:
rank : rank of the sample
x* : coordinate
z* : the data variable (on which the actual calculations are processed)
v* : measurement error variance
f* : auxiliary variable used as external drift
g* : gradient components
l* : lower bounds of intervals
u* : upper bounds of intervals
p* : proportion of a facies
w : the weighting variable
code : code variable
dom : domain variable
sel : the selection
The locators followed by '*' must be followed by a number.
items
:Object of class "data.frame"
The data
db[row,col]
returns the value to the corresponding element of the data.frame db
db[row,col]<-value
assigns value
to the corresponding element of the data.frame db
db$parameter
is used to query the value of parameter
from db
:
flag.grid : 1 for a Grid organization and 0 otherwise
ndim : Space dimension
nech : Number of samples
nactive : Number of active samples (in the current selection)
natt : Number of attributes
x0 : Vector of grid origin for a Grid organization or NA otherwise
dx : Vector of grid meshes for a Grid organization or NA otherwise
nx : Vector of number of grid meshes for a Grid organization or NA otherwise
locators: Array of locators (see corresponding Slot for details)
names : Array of variable names
items : The data frame containing the numerical information
limits: Matrix containing the grid extension or NA otherwise
Same as above but for assignment
Other functions are available, such as:
db.add
Add variables to a db-class
db.compare
Calculate pointwise statistics
db.create
Create a new db-class
db.delete
Delete variables from a db-class
db.digit
Identify samples of a db-class
by graphic picking
db.edit
Edit the contents of a db-class
db.extract
Extract a set of variables from a db-class
db.getcol
Identify the variable column from locator and rank
db.getname
Identify the variable name from locator and rank
db.grid.init
Initialize a db-class
according to a Grid organization
db.read.format
Load the contents of a Grid file (Specific format)
db.grid.locate
For a given set of coordinates, identify the closest node of a db-class
db.indicator
Convert a continuous variable into indicators using a limits-class
db.info
Returns information on the contents of the db.class
db.locate
Define the locators in a db-class
db.write.format
Save the contents of a variable within a db-class
into a Grid File (specific format)
db.polygon
Build a selection on the db-class
using a polygon-class
db.projec
Apply a projection on the db-class
db.read
Read the contents of a db-class
from a neutral ASCII File
db.rename
Modify the names of the variables within a db-class
db.rule
Convert a continuous variable into categorical variables using a rule-class
db.selcombine
Combine the current selection with the already existing one
db.sel
Create a selection variable
db.stat
Calculate statistics for a set of variables of a db-class
db.limits
Convert a continuous variable into categorical variables using limits-class
showClass("db")