get_all_rankings: Rank Mates

Description Usage Arguments Value Examples

View source: R/get_all_rankings.R

Description

Wrapper function to score the mating of all females to all males.
This function is a wrapper function for rank_mates.
It is not recommended to use more than 10x10 samples.

Usage

1
2
3
4
5
6
7
8
get_all_rankings(
  DB,
  females,
  males,
  type = "all_alleles",
  bonus = NULL,
  weighted_alleles = NULL
)

Arguments

DB

RSQLite database generated by make_database

females

Vector of sample IDs of the females to compare to the males. The Sample IDs must match the ones found in the DB.

males

Vector of sample IDs of the males to compare to the females. The Sample IDs must match the ones found in the DB.

type

The type of mating that is advantageous.

  1. all_alleles: the user specifies for each locus what is advantageous.

  2. assortive: Assortive (same alleles) is advantageous for all loci

  3. disassortive: Disassortive (different alleles) is advantageous for all loci

bonus

Numeric value to increase mating score if the state of alleles specified in weighted_alleles are met. If you specify .15 as your bonus, and 2/3 of your loci match the advantageous, then .10 will be used as the bonus. The final score will be increased by 10%. Must specify weighted_alleles.

weighted_alleles

vector listing allele IDs to calculate the bonus. Must specify bonus.

Value

List of dataframes - dataframe for each female ranked by best mating score.

Examples

1
2
3
4
5
6
## Not run: 
all_mates <- get_all_rankings(DB = DBs, female = females,
                              males = males, type = "all_alleles",
                              bonus=NULL, weighted_alleles=NULL)

## End(Not run)

danagibbon/MultifacitedChoice documentation built on Dec. 31, 2020, 11:10 p.m.