db.getname {RGeostats}R Documentation

Identify a variable Name

Description

Get a variable name from the locator type and its index

Usage

db.getname(db, loctype=NA, rank=1)

Arguments

db

The db-class structure where the variable must be identified

loctype

The type of locator. if set to NA, this function returns the name of the attribute whose rank is given by the argument rank.

rank

The index of the locator. When set to NA, returns all the names of the variables for the given loctype.

Value

The name of the corresponding variable (if present) and "NA" otherwise.

See Also

db-class,

Examples

data(Z_data.db) # Load the Documentation Points Db
Z_data.db # Print a short contents of the Db
db.getname(Z_data.db,"z",1) # Returns "First Point Variable"
db.getname(Z_data.db,NA,3) # Returns "x2"
db.getname(Z_data.db) # Returns "rank" (the name of the first field)
db.getname(Z_data.db,loctype="z",rank=NA) # All names with 'z' locator

# Clean up
rm(Z_data.db)

[Package RGeostats version 14.0.10 Index]