select_pheno: This function selects the phenotypes in a Cape object

Description Usage Arguments Value Examples

View source: R/select_pheno.R

Description

Updates the pheno object to include only 'pheno_which' columns. Optionally scale and/or normalize traits.

Usage

1
2
3
4
5
6
7
select_pheno(
  data_obj,
  pheno_which,
  min_entries = 5,
  scale_pheno = FALSE,
  rank_norm_pheno = FALSE
)

Arguments

data_obj

a Cape object

pheno_which

vector of names from the parameters YAML file. This vector should include both traits and covariates. The covariates are assigned after trait selection.

min_entries

minimum number of data entries the phenotype needs to have for it to be included. If any trait has fewer than min_entries, It will be removed with a warning.

scale_pheno

if TRUE then phenotypes are mean-centered and standardized

rank_norm_pheno

if TRUE then phenotypes are rank Z normalized

Value

updated Cape object

Examples

1
2
3
4
## Not run: 
data_obj <- select_pheno(data_obj, pheno_which = c("BW_24", "INS_24", "log_GLU_24"))

## End(Not run)

cape documentation built on Feb. 10, 2021, 5:06 p.m.