Description Usage Arguments Note Examples
A queryDB function to perform self-defined queries on the PROFOUND database.
1 | queryDB(queryItem)
|
queryItem |
a character string providing the query |
To report errors in the package or the data, please use the issue tracker in the GitHub repository of ProfoundData https://github.com/COST-FP1304-PROFOUND/ProfoundData
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # example requires that a sql DB is registered via setDB(dbfile)
# when run without a registered DB, you will get a file query (depending on OS)
## Not run:
# Basic query
overview <- queryDB("SELECT * FROM OVERVIEW")
tree <- queryDB("SELECT * FROM TREE")
# Site name or site_id
myQuery <- queryDB("SELECT date, tmax_degC FROM CLIMATE_LOCAL WHERE site == 'hyytiala'")
myQuery <- queryDB("SELECT date, tmax_degC FROM CLIMATE_LOCAL_12")
# Tree species
myQuery <- queryDB("SELECT * FROM TREE WHERE species == 'Picea abies'")
myQuery <- queryDB("SELECT * FROM TREE_piab")
# Specify variables
myQuery <- queryDB("SELECT date, tmax_degC FROM CLIMATE_LOCAL WHERE
tmax_degC > 20 AND site == 'hyytiala' AND year == 2010")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.