db.getcol {RGeoS}R Documentation

Identify a Field index

Description

Get the index of a field from the locator and its rank

Usage

db.getcol(db, loctype, rank)

Arguments

db

The db-class structure where the variable must be identified

loctype

The type of the locator

rank

The index of the locator

Value

The index of the corresponding field (if present) and 0 otherwise.

See Also

db-class,

Examples

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)

[Package RGeoS version 9.1.1 Index]