db.locate {RGeostats} | R Documentation |
Define the multiple locators for a set of variables
db.locate(db, names=NA, loctype=NA, start=1, flag.locnew=FALSE)
db |
Name of the DB to be updated |
names |
List of names of attributes to be updated. |
loctype |
Generic type of the locators (for mode information concerning the
available locators, please check |
start |
Index of the locator assigned to the variable(s). |
flag.locnew |
When TRUE, for a given locator, all attributes which are initially set to this locator are undefined first. |
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.
The db-class
where the fields are updated.
data(Z_data.db) # Load the Documentation Points Db Z_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' Z_data.db <- db.locate(Z_data.db,5,"z",3) Z_data.db # Set the locator of field 5 to the (defaulted) first rank of 'z' Z_data.db <- db.locate(Z_data.db,5,"z") Z_data.db # Note that the locator of field 4 is discarded # Set fields 4 and 5 back to their initial locators Z_data.db <- db.locate(Z_data.db,seq(4,5),"z") Z_data.db