View source: R/creating.phenotypic.transform.R
| creating.phenotypic.transform | R Documentation |
Function to perform create a transformation of phenotypes
creating.phenotypic.transform(
population,
phenotypic.transform.function = NULL,
trait = 1,
test.h2 = TRUE,
gen = NULL,
database = NULL,
cohorts = NULL,
h2 = seq(0.05, 0.5, by = 0.05),
export.h2 = FALSE,
n.sample = 1000
)
population |
Population list |
phenotypic.transform.function |
Phenotypic transformation to apply |
trait |
Trait for which a transformation is to be applied |
test.h2 |
Set to FALSE to not perform heritability check |
gen |
Quick-insert for database (vector of all generations to export) |
database |
Groups of individuals to consider for the export |
cohorts |
Quick-insert for database (vector of names of cohorts to export) |
h2 |
Vector of heritability input to test (before introducing noise from trafo; default: seq(0.05,0.5, by = 0.05)) |
export.h2 |
Set TRUE to export matrix of heritability before/after transformation |
n.sample |
Sample size to use in test.h2 (default: 1000) |
Population-list with a new phenotypic transformation function
data(ex_pop)
trafo <- function(x){return(x^2)}
population <- creating.phenotypic.transform(ex_pop, phenotypic.transform.function=trafo,
n.sample = 100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.