get_sf_phenotype: get_sf_phenotype function

Description Usage Arguments Value Examples

View source: R/get_sf_phenotype.R

Description

Adds the social father phenotype based on a phenotype table and a metadata table. If the social father is NA (i.e. unknown), the value is NA.

Usage

1
get_sf_phenotype(metadata, phenotype_table, phenotype_index)

Arguments

metadata:

Dataframe containing Bird.ID and the IDs of their respective social fathers (Social.Father).

phenotype_table:

Dataframe containing Bird.ID and some phenotype(s) of interest.

phenotype_index:

Index of variable of interest in phenotype_table.

Value

: The phenotype table with an additional column for the social father's phenotype.

Examples

1
2
3
metadata = tibble::tibble(Bird.ID = c("JS01","JS02") , Social.Father = c("JS02",NA))
phenotype_table = tibble::tibble(Bird.ID = c("JS01","JS02"), trait = c(2,3))
get_sf_phenotype(metadata, phenotype_table,2)

deponent-verb/birdsong.tools documentation built on Dec. 19, 2021, 10:12 p.m.