checkdata {GLIDE} | R Documentation |
A function used to check the core inputs of function glide
Description
It is used to check the core inputs of function glide
Usage
checkdata(formula,exposure_coeff,genotype_columns,data)
Arguments
formula |
A an object of class "formula": outcome ~ adjusting covariates. |
exposure_coeff |
A named mumeric vector or a one-column dataframe for the external coefficients for genotype-exposure associations. |
genotype_columns |
An integer vector, column indices of data in which genotype data are stored. |
data |
A data frame composed of formula-related components and snp genotype columns. |
Value
No return value, would generate error messages if input data are not right.
Author(s)
James Y. Dai and X. Wang
Examples
#load an example data; it includes a dataframe "simdat" and a one-column dataframe "coeff"
data(simdata)
simdat=simdata$simdat
coeff=simdata$coeff
formula=as.formula("outcome~age+sex+pc1+pc2+pc3")
genotype_columns=which(grepl("^SNP",colnames(simdat)))
checkdata(formula=formula,exposure_coeff=coeff,genotype_columns,data=simdat)
[Package GLIDE version 1.0.5 Index]