Description Usage Arguments Details Value Author(s) See Also Examples
get.SRDLdb
runs a query to fetch data from SMRU Access database table, based on set criteria
1 2 3 4 5 6 7 | get.SRDLdb(
theDB = "ct34",
theTable = "dive",
theFields = "All",
theRef = "ct34-2447-08",
thePath = "C:/MamVisAD/SMRUAccessDatabases"
)
|
theDB |
Name of database as defined in ODBC data sources |
theTable |
Name of database table |
theFields |
Vector of names or numbers representing which fields to be fetched, or "All" to get all tables. |
theRef |
ref code of specific animal for which data should be fetched. Can be either "All" for entire table, or one specific ref code. There is currently no support for subsets of multiple ref codes |
thePath |
Path to folder where database is located, if running in 64-bit R. |
The database must first be set up as a DSN data source. Note! On Windows, by default only 32-bit data sources can be used and R (or RStudio) has to be run in 32-bit mode for these functions to work. However, functionality has now been extended (experimental for now) to run under 64-bit R. For this to worl, the path to the database must be specified.
Returns a data frame with data from table following specified selection criteria.
Martin Biuw
tables.SRDLdb
for database table names,
fields.SRDLdb
for table field names,
ref.SRDLdb
for ref ID codes,
dep.SRDLdb
for retrieving deployments metadata
1 2 | dive <- get.SRDLdb('ct34', 'dive', c(c(1:35), c(79:80)), 'ct34-2447-08')
dive <- get.SRDLdb('ct34', 'dive', c('ref', 'DE_DATE', 'SURF_DUR', 'DIVE_DUR', 'MAX_DEP')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.