Skip to contents

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 MendelianRandomization::mr_input.

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)
}
#> [1] "data.frame" "mr_format"