Description Usage Arguments Value Examples
queryFiles
returns paths to recordings, images or videos. For this
function to work you need to be connected to madmex folder, this is
because the function searches for existing files in the madmex directories.
1 2 3 |
database |
Connection to an existing postgresql or sqlite database (as
returned by |
file_type |
String specifing which file paths should be retrieved, value should be "recordings" or "images" (includes images and videos from the camera trap). |
organization |
Character vector of organizations to include in the search (CONAFOR, CONANP, FMCN), defaults to "all". |
cgl_id |
Character vector of conglomerate ids to include in the searh, defaults to "all". |
year_visit |
Numeric vector indicating the year(s) to include in the search, defaults to 2014:2016. |
month_visit |
Numeric vector indicating the month(s) to include in the search, defaults to 1:12. |
photo, video, ultrasonic |
Binary variables, if
|
original |
Indicates if a column with the original file name should be included in the results. |
A data.frame
containing the following columns:
file_type
, state
, institucion
(organization),
cgl_id
(conglomerate id), date
(date of visit),
lat, lon
(coordinates of the conglomerate), and
archivo_nombre_original
(if original = TRUE, the original file
name).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # connect to sqlite database (snmb)
database <- dplyr::src_sqlite(system.file("extdata", "snmb.sqlite",
package = "querysnmb"))
files_images_videos <- queryFiles(database, file_type = "images",
cgl_id = "405", year_visit = 2014)
files_videos <- queryFiles(database, file_type = "images", cgl_id = "2286",
year_visit = 2014, photo = FALSE)
files_acoustic <- queryFiles(database, file_type = "recordings",
ultrasonic = FALSE, year_visit = 2014)
## 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)
files_acoustic_name <- queryFiles(database, file_type = "recordings",
ultrasonic = FALSE, year_visit = 2014, original = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.