db.ident {RGeostats} | R Documentation |
Search for a list of variables in a Db
db.ident(db, names = NA, lower = NA, upper = NA, flag.one = FALSE, flag.nonull = TRUE)
db |
The |
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. |
The argument 'names' can be provided as a list of items. Each item can be:
a numeric value: it corresponds to the attribute rank (between 1 and the total number of attributes).
a string: it corresponds to a string which will be searched first in the list of variable names, then in the list of locators.
If an attribute is specified more than once, it is retained only once.
List of attribute numbers that have been selected.
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)