eppMatrix: Class eppMatrix Class 'eppMatrix'.

Description Usage Arguments Value Slots See Also Examples

View source: R/eppMatrix.R

Description

Class eppMatrix Class eppMatrix.

Converts a data.frame to a eppMatrix object using a ~male+female formula.

Usage

1
eppMatrix(data, pairs = ~male + female)

Arguments

data

a data.frame

pairs

a formula indicating the extra-pair male and the extra-pair female in that order.

Value

An object of class eppMatrix with two slots.

Slots

list("male")

Object of class "character": extra-pair male ID

:

Object of class "character": extra-pair male ID

list("female")

Object of class "character":extra-pair female ID

:

Object of class "character":extra-pair female ID

See Also

epp

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
eppPairs = data.frame(male = c("m1", "m2", "m1"), female=c("f3", "f1", "f2") )
e = eppMatrix(eppPairs,  pairs = ~ male + female)
class(e)
showClass("eppMatrix")

data(bluetit_breeding)
data(bluetit_epp)
b = bluetit_breeding[bluetit_breeding$year_ == 2010, ]
eppPairs = bluetit_epp[bluetit_epp$year_ == 2010, ]

breedingDat  = SpatialPointsBreeding(b, id = 'id', coords = ~ x + y, breeding = ~ male + female)
eppDat = eppMatrix(eppPairs, pairs = ~ male + female)

plot(breedingDat, eppDat)

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