Description Usage Arguments Value Examples
View source: R/bioSave-methods.R
Import tables (e.g. life history data) to an active rangeMapper
project.
1 2 3 4 5 |
con |
an sqlite connection pointing to a valid |
loc |
file location or |
tableName |
if missing, the name of the file or |
... |
arguments to pass to the corresponding methods: e.g. the ID, the column corresponding to the names of the range files |
a ‘BIO’ table is created in the corresponding
rangeMapper
project.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | require(rangeMapper)
require(rgdal)
wd = setwd(tempdir())
r = readOGR(system.file(package = "rangeMapper",
"extdata", "wrens", "vector_combined"), "wrens", verbose = FALSE)
dbcon = rangeMap.start(file = "wrens.sqlite", overwrite = TRUE,
dir = tempdir() )
global.bbox.save(con = dbcon, bbox = r)
gridSize.save(dbcon, gridSize = 2)
canvas.save(dbcon)
processRanges(spdf = r, con = dbcon, ID = "sci_name" )
# Upload BIO tables
data(wrens)
Troglodytes = wrens[grep("Troglodytes", wrens$sci_name), c(2, 5)]
bio.save(con = dbcon, loc = Troglodytes, ID = "sci_name")
setwd(wd)
## Not run:
require(rangeMapper)
require(rgdal)
wd = setwd(tempdir())
r = readOGR(system.file(package = "rangeMapper",
"extdata", "wrens", "vector_combined"), "wrens", verbose = FALSE)
dbcon = rangeMap.start(file = "wrens.sqlite", overwrite = TRUE,
dir = tempdir() )
global.bbox.save(con = dbcon, bbox = r)
gridSize.save(dbcon, gridSize = 2)
canvas.save(dbcon)
processRanges(spdf = r, con = dbcon, ID = "sci_name", metadata = rangeTraits() )
wrensPath = system.file(package = "rangeMapper", "data", "wrens.csv")
bio.save(con = dbcon, loc = wrensPath, ID = "sci_name")
bio.merge(dbcon, "wrensNew")
metadata2bio(dbcon)
setwd(wd)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.