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

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)

# Clean up
rm(Z_data.db)

[Package RGeostats version 11.0.6 Index]