mrinput_mr_format {mrbayes} | R Documentation |
Convert an object of class MRInput from the MendelianRandomization package to the mrbayes mr_format class
Description
Creates a data.frame with class mr_format
from an object of class MRInput
generated by MendelianRandomization::mr_input
.
Usage
mrinput_mr_format(dat)
Arguments
dat |
Object from |
Value
Object of class mr_format
, the mrbayes format
Examples
if (requireNamespace("MendelianRandomization", quietly = TRUE)) {
dat <- MendelianRandomization::mr_input(bx = bmi_insulin$beta.exposure,
bxse = bmi_insulin$se.exposure,
by = bmi_insulin$beta.outcome,
byse = bmi_insulin$se.outcome,
snps = bmi_insulin$rsid)
dat <- mrinput_mr_format(dat)
head(dat)
class(dat)
}
[Package mrbayes version 0.5.1 Index]