Learn R Programming

cape (version 3.1.2)

select_pheno: This function selects the phenotypes in a Cape object

Description

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

Usage

select_pheno(
  data_obj,
  pheno_which,
  min_entries = 5,
  scale_pheno = FALSE,
  rank_norm_pheno = FALSE
)

Value

updated Cape object

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

Examples

Run this code
if (FALSE) {
data_obj <- select_pheno(data_obj, pheno_which = c("BW_24", "INS_24", "log_GLU_24"))
}

Run the code above in your browser using DataLab