subsetData: interior subsetting function

Description Usage Arguments Details Value

Description

This is an internal function that subsets the SNP column with matching name and removes rows with missing observations.

Usage

1
  subsetData(snp,formula_tofit,data,plinkCC)

Arguments

snp

a string specifying the SNP of interests. The SNP ID must exist in data.

formula_tofit

a formula object of the genetic model. This is directly obtained from evian function.

data

a data frame inputted from the main function. Should contain the SNP ID snp as one of the column names.

plinkCC

A boolean type that specifies how case/control are coded. case/control were coded 1/0 if it is FALSE, and were coded 2/1 if TRUE.

Details

subsetData is an interior function that subsets the full dataset into a smaller set containing only one specific SNP by the snp option. It will then remove any rows with missing values.

Value

This function returned a dataframe containing phenotype, covariates in their original column names as in the full dataset, and a column called X representing the genotype information for the SNP chosen. The column names are essetial.


evian documentation built on May 23, 2019, 5:02 p.m.

Related to subsetData in evian...