SpatialPointsBreeding: Class SpatialPointsBreeding. Class 'SpatialPointsBreeding'.

Description Usage Arguments Value See Also Examples

View source: R/SpatialPointsBreeding.R

Description

Class SpatialPointsBreeding. Class SpatialPointsBreeding.

Converts a data.frame to a SpatialPointsBreeding object. The SpatialPointsBreeding class extends SpatialPointsDataFrame with three extra slots defining the id (i.e. nest or breeding box) and the pair identity (i.e. male and female), respectively.

Usage

1
2
SpatialPointsBreeding(data, proj4string, coords = ~x + y, breeding = ~male +
  female, id)

Arguments

data

a data.frame containing the coordinates (e.g. "x", "y"), the location id, and the pair identity (e.g. "male", "female") together with any other optional variables (e.g. individuals or nest traits).

proj4string

A CRS object containing a valid proj4 string. See CRS proj4string for details.

coords

Formula specifying which columns in object are the spatial coordinates. Argument passed to coordinates

breeding

Formula defining the male and female ID in that order (in the form of e.g. ~male+female).

id

Integer specifying the location id (e.g. nest box number, den ID).

x

a SpatialPointsBreeding object

y

an eppMatrix object

pch

see plot.default

axes

see plot.default

add

see plot.default

xlim

see plot.default

ylim

see plot.default

...

further arguments to pass to plot(as(x, "Spatial")

cex

see plot.default

col

see plot.default

col.epp

extra-pair partners color

lwd

see plot.default

lty

see plot.default

bg

see plot.default

Value

Item of the class 'SpatialPointsBreeding' with 8 slots.

id

Location ID (see input)

male

(Male IDs.)

female

Female IDs.

data

A data.frame containing all the optional variables (except location and individual ID-s)

coords.nrs

see SpatialPoints

coords

coordinates

bbox

see Spatial

proj4string

see CRS

See Also

epp

Examples

1
2
3
4
5
6
7
8
9
d = data.frame(
  x = c(4, 17, 16, 41, 41, 43, 86, 62, 71, 92, 95,53, 34, 27, 53), 
  y = c(3, 18, 36, 6, 18, 50, 3, 21, 40, 43, 57, 62, 62, 45, 37), 
  id = 1:15,male = paste0('m', 1:15), female = paste0('f', 1:15), 
    stringsAsFactors = FALSE)

b = SpatialPointsBreeding(d, id = 'id', breeding = ~ male+female)	

plot(b)

valcu/expp documentation built on Dec. 17, 2017, 5:27 p.m.