Plot an mr_result object
plot.mr_result.RdCreates diagnostic plots for Mendelian randomisation results using
TwoSampleMR plotting functions. Requires the ggplot2 package.
Value
A ggplot object (or list of ggplot objects for "scatter").
Returns NULL invisibly if the result status is not "success" or if
no results are available.
Examples
if (FALSE) { # \dontrun{
result <- run_mr(
exposure = cd40_exposure, exposure_id = "CD40",
outcome = sjogren_outcome, outcome_id = "SjD",
instrument_region = list(chromosome = "20", start = 44746911, end = 44758502),
bfile = system.file("extdata", "ld_ref", package = "mrpipeline")
)
plot(result, type = "scatter")
plot(result, type = "forest")
plot(result, type = "funnel")
} # }