occurences: Create Occurrences

occurrencesR Documentation

Create Occurrences

Description

A simply constructor function for class ⁠"Occurrences"⁠.

Usage

occurrences(x, schema = c("taxon", "gridcell"))

## S4 method for signature 'Occurrences'
plot(x, type,  ...)

## S4 method for signature 'Occurrences'
text(x, type,  ...)

## S4 method for signature 'Occurrences'
pdf(object, background, file, width, height, dingbats = FALSE, ...)

Arguments

x

A data.frame or Spatial* object.

schema

Character. Columns to be searched for. Column ⁠"taxon"⁠ (case independent) has to be present in any case. If ⁠x⁠ inherits Spatial* ⁠gridcell⁠ can be missing and will be calculated.

object

An object of class "Occurrences" to be plotted.

background

An object of class "Background" to be used to set up plotting region with perfect alignment to background map when stacked graphically/visually.

type

Either ⁠ASIS⁠ (coordinates) or ⁠GRIDCELL⁠.

file, width, height, dingbats

Arguments for pdf. See pdf.

...

Not used.

Details

Use the ⁠pdf⁠ function to plot occurrence points to top of map background saved mit pdf method for that class.

Value

An object of class ⁠Occurrences⁠.

Author(s)

Roland Kaiser

See Also

background

Examples

e <- extent(13,14,46,47)
g <- floragrid(e)
x1 <- data.frame(taxon = "Genus species", gridcell = sample(g$GRIDCELL, 10))
x2 <- data.frame(taxon = "Genus species spp. subspecies", gridcell = sample(g$GRIDCELL, 10))
x <- rbind(x1, x2)
coordinates(x) <- gridcell2lnglat(x$gridcell)

o <- occurrences(x)

plot(o[o$taxon == "Genus species", ])


kardinal-eros/sabotag-tools documentation built on Feb. 6, 2025, 1:12 a.m.