Parent-offspring pairs are counted between potential offspring cohort and potential parents grouped by age, year, and location of sampling.
Arguments
- samples
A
sample_familydata.frame oftekka()result.- x
An outcome of
as_pop()- path
A file name or connection to write to
Value
A data.frame of "pop" subclass with six columns:
cohort: birth year of offspringcapture_year: of parentscapture_age: of parentslocation: where parents were sampledpops: the count of parent-offspring pairs observed within samplescomps: the number of possible comparisons, including only pairs where one sample is younger than the other.
Details
as_pop() converts a sample_family data frame to POP format.
write_pop() writes a POP data.frame to a file.
See also
as_pop2() for the extended POP format.
find_kinship() to count kinship within samples.
Examples
set.seed(666)
result = tekka("-y25 -l2 --sa 2,2 --sj 2,2")
samples = result$sample_family[[1L]]
as_pop(samples)
#> # A tibble: 25 × 6
#> cohort capture_year capture_age location pops comps
#> <int> <int> <int> <int> <int> <int>
#> 1 24 24 10 1 1 4
#> 2 24 25 7 1 1 8
#> 3 25 25 7 1 2 8
#> 4 15 24 10 1 0 1
#> 5 18 24 9 1 0 2
#> 6 18 24 10 1 0 2
#> 7 20 24 9 1 0 3
#> 8 20 24 10 1 0 3
#> 9 20 25 7 1 0 6
#> 10 21 24 4 0 0 2
#> # ℹ 15 more rows