db.getname {RGeoS} | 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 |
The name of the corresponding variable (if present) and "NA" otherwise.
data(Example_data.db) # Load the Documentation Points Db Example_data.db # Print a short contents of the Db db.getname(Example_data.db,"z",1) # Returns "First Point Variable" db.getname(Example_data.db,NA,3) # Returns "x2" db.getname(Example_data.db) # Returns "rank" (the name of the first field) # Clean up rm(Example_data.db)