subsetData {evian} | R Documentation |
interior subsetting function
Description
This is an internal function that subsets the SNP column with matching name and removes rows with missing observations.
Usage
subsetData(snp,formula_tofit,data,plinkCC)
Arguments
snp |
a string specifying the SNP of interests. The SNP ID must exist in |
formula_tofit |
a formula object of the genetic model. This is directly obtained from |
data |
a data frame inputted from the main function. Should contain the SNP ID |
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.