| snapshot | R Documentation |
Create a snapshot of the data linked to entities. Including metadata, dates, samples, age models and pollen counts.
snapshot(x, ...) ## S3 method for class 'MariaDBConnection' snapshot(x, ..., ID_ENTITY, ID_SITE, entity_name, site_name, quiet = TRUE) ## S3 method for class 'character' snapshot(x, ..., use_site_name = FALSE) ## S3 method for class 'numeric' snapshot(x, ..., use_id_site = FALSE) ## S3 method for class 'tbl_df' snapshot(x, ...) ## S3 method for class 'tbl' snapshot(x, ...) ## S3 method for class 'data.frame' snapshot(x, ...) ## Default S3 method: snapshot(x, ...)
x |
This object accepts different classes. If the given object is
a database connection, then extracts data from the database using the
|
... |
Optional parameters. |
ID_ENTITY |
Optional, if |
ID_SITE |
Optional, if |
entity_name |
Optional, if |
site_name |
Optional, if |
quiet |
Boolean flag to indicate if queries should be displayed. |
use_site_name |
Boolean flag to indicate whether to search using
|
use_id_site |
Boolean flag to indicate whether to search using
|
List with the individual tables.
## Not run:
conn <- dabr::open_conn_mysql(dbname = "SPECIAL-EPD",
password = rstudioapi::askForPassword())
# Using the entity name
snp1 <- special.epd::snapshot(conn, entity_name = "MBA3")
snp1
# Using the site name
snp2 <- special.epd::snapshot(conn, site_name = "Aammiq")
snp2
# Using the ID_ENTITY
snp3 <- special.epd::snapshot(conn, ID_ENTITY = 1)
snp3
# Using the ID_SITE
snp4 <- special.epd::snapshot(conn, ID_SITE = 2)
snp4
## End(Not run)
# Using the entity name
snp1 <- special.epd::snapshot("MBA3")
snp1
# Using the site name
snp2 <- special.epd::snapshot("Aammiq", use_site_name = TRUE)
snp2
# Using the ID_ENTITY
snp1 <- special.epd::snapshot(1)
snp1
# Using the ID_SITE
snp2 <- special.epd::snapshot(2, use_id_site = TRUE)
snp2
# Using the entity table
`%>%` <- magrittr::`%>%`
snp1 <- special.epd::entity %>%
dplyr::slice(1) %>%
special.epd::snapshot("MBA3")
snp1
# Using a custom data frame (`tibble` object) with site names
snp2 <- tibble::tibble(
site_name = c("Lingreville", "Machova")
) %>%
special.epd::snapshot()
snp2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.