View source: R/get_sf_phenotype.R
get_sf_phenotype | R Documentation |
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. Function goes through each row in phenotype table and checks the father. Then we get the father's phenotype from the same table.
get_sf_phenotype(metadata, phenotype_table, phenotype_index)
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. |
: The phenotype table with an additional column for the social father's phenotype.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.