Description Usage Arguments Value Examples
Search for species records in Invaders, Footprints, Specimens and Camera tables.
1 | querySpPresence(database, noms, malla = NULL)
|
database |
Connection to an existing postgresql or sqlite database (as
returned by |
noms |
String indicating the species names to look for (ex: "vaca|equus") |
malla |
Optional parameter indicating the coordinates of the
conglomerates, malla most be a data.frame with columns cgl_id, lng, lat,
where cgl_id is the conglomerate id (class double), lng is longitude and
lat is latitude. If |
A list with 2 elements (both have class data.frame
):
The first element is indexed by conglomerate id (Id) and includes only the conglomerates where the species specified by noms were found, its columns are: Estado, Municipio, and Uso suelo, it also includes an indicator of the kind of records found, this is, if records belong to invaders (EI), footprints/feces (HE), opportunistic invaders (EI ex), opportunistic footprints/feces, opportunistic specimens/remains (ER ex) or camera trap (Cámara).
The second element is indexed by conglomerate id (Id) and
includes only the conglomerates where the species specified by noms were
found, the columns are the coordinates of the conglomerate
(lng, lat), the coordinates can be supplied by the user (throught
the parameter malla
) or taken from the database.
1 2 3 4 5 6 7 8 9 10 11 12 | # connect to sqlite database (snmb)
database <- dplyr::src_sqlite(system.file("extdata", "snmb.sqlite",
package = "querysnmb"))
presence_cows <- querySpPresence(database, noms = "vaca|bos|taurus")
## Not run:
# connect to postgreSQL database (snmb)
PASS_SNMB = Sys.getenv("PASS_SNMB")
database <- dplyr::src_postgres(dbname = "snmb", host = "dbms", user =
"snmb", password = PASS_SNMB)
presence_cows <- querySpPresence(database, noms = "vaca|bos|taurus")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.