db.locate {RGeoS}R Documentation

Define multiple locators

Description

Define the multiple locators for a set of variables

Usage

db.locate(db, columns, loctype=NA, start=1)

Arguments

db

Name of the DB to be updated

columns

List of indices of the fields to be updated.

loctype

Generic type of the locators. When set to NA, the locator are set to NA.

start

Index of the locator assigned to the variable(s).

Details

The variables specified in 'columns' are set to this generic locator and numbered from 'start' to 'start+n' (where 'n' designates the length of 'columns'). If the argument "loctype" is not provided, the locators of the variables are set to NA: the variables are declassified.

Value

The db-class where the fields are updated.

See Also

db-class,

Examples

data(Example_data.db) # Load the Documentation Points Db
Example_data.db # Print a short contents of the Db
# The locators are "NA","x1","x2","z1","z2"

# Set the locator of field 5 to the third rank of 'z'
Example_data.db <- db.locate(Example_data.db,5,"z",3) 
Example_data.db

# Set the locator of field 5 to the (defaulted) first rank of 'z'
Example_data.db <- db.locate(Example_data.db,5,"z") 
Example_data.db # Note that the locator of field 4 is discarded 

# Set fields 4 and 5 back to their initial locators
Example_data.db <- db.locate(Example_data.db,seq(4,5),"z")
Example_data.db

[Package RGeoS version 9.1.1 Index]