db.ident {RGeostats}R Documentation

Search for a list of variables in a Db

Description

Search for a list of variables in a Db

Usage

db.ident(db, names = NA, lower = NA, upper = NA,
         flag.one = FALSE, flag.nonull = TRUE)

Arguments

db

The db-class containing the variables

names

List of variable names. See details for more information

lower

Minimum rank of the selected variable(s) if specified

upper

Maximum rank of the selected variable(s) if specified

flag.one

If TRUE, a single variable may be selected. If more than 1 variable is designated, an error is generated.

flag.nonull

If TRUE, at least one attribute must be selected. If no attribute is finally defined, an error is generated.

Details

The argument 'names' can be provided as a list of items. Each item can be:

If an attribute is specified more than once, it is retained only once.

Value

List of attribute numbers that have been selected.

Examples

data(Z_data.db) # Load the Documentation Points Db
Z_data.db # Print a short contents of the Db
db.ident(Z_data.db,"x*")   # Returns 2 3
db.ident(Z_data.db,"F*V*e",2) # Returns 4 (Name: "First Point Variable")
db.ident(Z_data.db,c(2:3,"z2")) # Returns 2 3 5

# Clean up
rm(Z_data.db)

[Package RGeostats version 14.0.10 Index]