ramp: *ra*nge *m*apper *p*ipe line.

Description Usage Arguments Value Note See Also Examples

View source: R/rangeMapper-ramp.R

Description

A quick alternative to initiate a project by pipelining several functions.

Usage

1
2
ramp(file, dir = tempdir(), gridSize, spdf, bbox = spdf, ID, biotab,
  metadata, FUN, overwrite = FALSE)

Arguments

file

project file name.

dir

project directory.

gridSize

grid resolution (in units previously set by global.bbox.save)

spdf

SpatialPolygonsDataFrame object containing all the ranges.

bbox

the spatial domain of the project (see global.bbox.save )

ID

a character vector of length one. An spdf column name indicating the range ID (e.g. species name).

biotab

character string identifying the ‘BIO’ table to use.

metadata

a named list of functions. See rangeTraits and metadata.update.

FUN

the function to be applied to each pixel. If FUN is missing then species richness (species count) is computed.

overwrite

logical vector, default to FALSE (the file is kept but all tables are dropped).

Value

an sqlite connection to a rangeMapper project

Note

ramp combines all the functions from rangeMap.start() to processRanges() and rangeMap.save() but is less flexible as compared with a step-by-step project building.

See Also

rangeMap.start global.bbox.save gridSize.save canvas.save processRanges bio.save rangeMap.save

Examples

1
2
3
4
5
6
7
breding_ranges = rgdal::readOGR(system.file(package = "rangeMapper",
     "extdata", "wrens", "vector_combined"), "wrens", verbose = FALSE)
data(wrens)
d = subset(wrens, select = c('sci_name', 'body_size', 'body_mass', 'clutch_size') )
con = ramp("wrens.sqlite", gridSize = 10, spdf = breding_ranges, biotab = d, ID = "sci_name",
            metadata = rangeTraits(), FUN = "median", overwrite = TRUE)
m = rangeMap.fetch(con)

rangeMapper documentation built on May 19, 2017, 9:58 a.m.

Search within the rangeMapper package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.