KinPairData-class {kindisperse}R Documentation

Formal class KinPairData

Description

The class KinPairData is a formal (S4) class for storing kinship and lifespan dispersal information concerning kin pairs. It is the base class on which the KinPairSimulation class is built. The KinPairData class is used to store information about the spatial distribution of kin dyads for use in calculating axial sigmas of intergenerational dispersal as initially implemented in Jasper et al. 2019 (doi: 10.1111/1755-0998.13043).

Usage

## S4 method for signature 'KinPairData'
show(object)

## S4 method for signature 'KinPairData'
initialize(
  .Object,
  data = NULL,
  kinship = NULL,
  lifestage = NULL,
  cycle = NULL,
  ...
)

Arguments

object

an object of class KinpairData

.Object

the KinPairData object to be constructed

data

data about kinship to be used to construct object (tibble, data.frame, or numeric vector of distances)

kinship

character. Kinship category value for object. - one of PO, FS, HS, AV, HAV, GG, 1C, H1C, GAV, HGAV, 1C1, H1C1, GGG, 2C, and H2C.

lifestage

character. Lifestage value for object. - one of 'immature', 'ovipositional' or 'unknown'

cycle

non-negative integer or vector of two such integers - Represents the number of complete breeding cycles each simulated individual has undergone before the sampling point, where the time between birth and first reproduction is coded as '0', that between first and second reproduction '1', etc. (default 0). If the first individual was sampled as a juvenile & the second as an adult of equivalent stage, the vector c(0, 1) would be used. In most situations, defualt will be appropriate

...

additional argument to pass to downstream functions in future

KinPairData

object of class KinPairData

Details

This class is essentially wrapped around the tbl_df class but with (a) expectations around certain columns that must be present (id1, id2, kinship, & distance - three 'character' & one 'numeric' column), as well as (b) additional attributes (kinship, lifestage, & cycle) characterizing the close-kin dyads being stored.These attributes, as well as the embedded vector of distances, can be accessed with the methods kinship, lifestage, breeding_cycle and distances.

Objects from this class are returned from the df_to_kinpair and csv_to_kinpair functions (& related), and are directly constructed with the namesake KinPairData() function. They can be passed to the sample_kindist function for filtering and subsampling, and to axial functions (including axials_standard and axpermute_standard) for estimation of axial dispersal.

Value

returns object of class KinPairData

No return value, called for side effects

Returns an object of class KinPairData

Methods (by generic)

Slots

kinship

character - one of PO, FS, HS, AV, HAV, GG, 1C, H1C, GAV, HGAV, 1C1, H1C1, GGG, 2C, and H2C.

lifestage

character - lifestage at sampling - either 'immature', 'ovipositional' or a stage corresponding to a DispersalModel custom stage

cycle

non-negative integer or vector of two such integers - Represents the number of complete breeding cycles each individual has undergone before the sampling point, where the time between birth and first reproduction is coded as '0', that between first and second reproduction '1', etc. (default 0). If the first individual was sampled as a juvenile & the second as an adult of equivalent stage, the vector c(0, 1) would be used. In most situations, the default will be appropriate

tab

tbl_df. - tibble of dispersal values

See Also

Other kdclasses: DispersalModel-class, KinPairSimulation-class


[Package kindisperse version 0.10.2 Index]