db.getcol {RGeoS} | R Documentation |
Get the index of a field from the locator and its rank
db.getcol(db, loctype, rank)
db |
The |
loctype |
The type of the locator |
rank |
The index of the locator |
The index of the corresponding field (if present) and 0 otherwise.
data(Example_data.db) # Load the Documentation Points Db Example_data.db # Print a short contents of the Db db.getcol(Example_data.db,"z",2) # Returns 5 (field location of locator 'z2') db.getcol(Example_data.db,"z",4) # Returns 0 (as there is no 'z4' locator) # Clean up rm(Example_data.db)