rmap_save_subset {rangeMapper} | R Documentation |
Save subsets
Description
rmap_save_subset
creates subsets based on the canvas properties and/or the properties of one or
several bio
tables.
Usage
rmap_save_subset(con, dst, ...)
## S4 method for signature 'rmapConnection,character'
rmap_save_subset(con, dst, ...)
Arguments
con |
a |
dst |
the name of the new subset table. |
... |
SQL |
Details
Subsets are defined using table_name = "CONDITION"
where CONDITION
can be any SQL
WHERE
call
defined for the given table.
Here is a summary of the SQL operators relevant in this context:
Operator | Description |
= or == or IS or ! = or <> or IS NOT | Equals or Non-equals. |
> or < or >= or <= | Greater (Less) than (or equal). |
IN or NOT IN | multiple given values e.g. a IN (a,b,c,x,y) . |
BETWEEN | Between a given range (given values included) e.g. BETWEEN 1 and 10 . |
LIKE | Pattern search e.g. LIKE "%keyword%" . LIKE is case insensitive. |
GLOB | Similar to LIKE but uses the Unix wildcards (* ,? ,[] ). e.g. [a-zA-Z0-9] matches any single alphanumeric. GLOB` is case sensitive. |
Value
TRUE when the database view is written to the project file, FALSE otherwise.
Examples
require(rangeMapper)
con = rmap_connect()
wrens = read_wrens()
rmap_add_ranges(con, x = wrens, ID = 'sci_name')
rmap_prepare(con, 'hex', cellsize = 500)
rmap_add_bio(con, wrens, 'sci_name')
rmap_save_map(con)
rmap_save_subset(con,'s1',
species_richness = 'species_richness > 10',
wrens = 'body_mass > 19 AND clutch_size > 3')
dbDisconnect(con)
[Package rangeMapper version 2.0.3 Index]