db.extract {RGeostats} | R Documentation |
Extracts a vector from the db-class
db.extract(db, names, flag.compress = TRUE, flag.2d=FALSE, flag.log10=FALSE, pos.x=1, pos.y=2, ref = NA, flag.ignore.sel=FALSE)
db |
|
names |
List of names of the attributes which must be extracted.
For more information see |
flag.compress |
If TRUE, the function only returns the values corresponding to the active samples (not masked by the current selection). Otherwise, values are returned for all the samples. |
flag.2d |
If TRUE (and if the |
flag.log10 |
If TRUE, the extracted vector is log-transformed (base 10). The negative values are turned into NA. |
pos.x |
Gives the rank of the coordinate used on the abscissae axis. Used only if flag.2d = TRUE. |
pos.y |
Gives the rank of the coordinate used on the ordinate axis. Used only if flag.2d = TRUE |
ref |
Vector (of space dimension) which gives the indices of the reference corner point. The extracted plane contains the reference corner point. Used only if flag.2d = TRUE. |
flag.ignore.sel |
When TRUE, this extraction is performed ignoring any possible selection. |
The vector of values. Its length is equal to the total number of samples (if flag.compress=FALSE) or to the number of active samples otherwise. If the number of fields to be extracted is equal to 1, the result is a list of values, whereas it will be a data.frame when extracting more than 1 field.
data(Z_data.db) # Load the Documentation Points Db Z_data.db # Print a short contents of the Db # Extract the vectors which corresponds to variables 'z1' and 'z2' # vector <- db.extract(Z_data.db,names=c("z1","z2")) vector # Print the contents of the extracted vector # # Clean up rm(Z_data.db,vector)