db.getname {RGeostats} | R Documentation |
Get a variable name from the locator type and its index
db.getname(db, loctype=NA, rank=1)
db |
The |
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. |
The name of the corresponding variable (if present) and "NA" otherwise.
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)