mrinput_mr_format: Convert an object of class MRInput from the...

Description Usage Arguments Value Examples

View source: R/mrinput_mrformat.R

Description

Creates a data.frame with class mr_format from an object of class MRInput generated by MendelianRandomization::mr_input.

Usage

1

Arguments

dat

Object from MendelianRandomization::mr_input.

Value

Object of class mr_format, the mrbayes format

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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)
}

mrbayes documentation built on Oct. 2, 2021, 5:08 p.m.