snapshot | R Documentation |
Create a snapshot of the data linked to entities. Including metadata, climate & vegetation reconstructions 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 = "SMPDSv2",
password = rstudioapi::askForPassword())
# Using the entity name
snp1 <- smpds::snapshot(conn, entity_name = "juodonys_core")
snp1
# Using the site name
snp2 <- smpds::snapshot(conn, site_name = "Petresiunai")
snp2
# Using the ID_ENTITY
snp3 <- smpds::snapshot(conn, ID_ENTITY = 1)
snp3
# Using the ID_SITE
snp4 <- smpds::snapshot(conn, ID_SITE = 2)
snp4
## End(Not run)
# Using the entity name
snp1 <- smpds::snapshot("juodonys_core")
snp1
# Using the site name
snp2 <- smpds::snapshot("Petresiunai", use_site_name = TRUE)
snp2
# Using the ID_ENTITY
snp1 <- smpds::snapshot(1)
snp1
# Using the ID_SITE
snp2 <- smpds::snapshot(2, use_id_site = TRUE)
snp2
# Using the entity table
`%>%` <- magrittr::`%>%`
snp1 <- smpds::entity %>%
dplyr::slice(1) %>%
smpds::snapshot()
snp1
# Using a custom data frame (`tibble` object) with site names
snp2 <- tibble::tibble(
site_name = c("Aligol lake", "Big Sandy Creek")
) %>%
smpds::snapshot()
snp2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.