recode_pheno_values: Recode phenotype values

Description Usage Arguments Value Examples

View source: R/helpers.R

Description

Given a data frame of phenotypes, we apply the following operations: 1) replace -9 with NA 2) for binary phenotypes, we subtract 1 so that the phenotype values takes [1, 0] instead of [2, 1] Note: you need to specify the list of binary and quantitative phenotypes using the phes_binary and phes_quantitative args.

Usage

1
recode_pheno_values(pheno_df, phes_binary = NULL, phes_quantitative = NULL)

Arguments

pheno_df

A phenotype data frame

phes_binary

A list of binary phenotypes

phes_quantitative

A list of quantitative phenotypes

Value

an updated phenotype data drame

Examples

1
2
3
4
## Not run: 
recode_pheno_values(pheno_df, phes_binary=c('HC326'), phes_quantitative=c('INI50')

## End(Not run)

rivas-lab/snpnet documentation built on Dec. 14, 2021, 3:22 a.m.