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
(https://doi.org/10.1111/1755-0998.13043).
# S4 method for KinPairData
show(object)# S4 method for KinPairData
initialize(
.Object,
data = NULL,
kinship = NULL,
lifestage = NULL,
cycle = NULL,
...
)
an object of class KinpairData
the KinPairData object to be constructed
data about kinship to be used to construct object (tibble, data.frame, or numeric vector of distances)
character. Kinship category value for object. - one of PO, FS, HS, AV, HAV, GG, 1C, H1C, GAV, HGAV, 1C1, H1C1, GGG, 2C, and H2C.
character. Lifestage value for object. - one of 'immature', 'ovipositional' or 'unknown'
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
object of class KinPairData
returns object of class KinPairData
No return value, called for side effects
Returns an object of class KinPairData
show
: standard print method
initialize
: initialize method
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
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.
Other kdclasses:
DispersalModel-class
,
KinPairSimulation-class