diff --git a/vignettes/perform_mr.Rmd b/vignettes/perform_mr.Rmd index 46ee8390..b8046a05 100644 --- a/vignettes/perform_mr.Rmd +++ b/vignettes/perform_mr.Rmd @@ -13,6 +13,7 @@ vignette: > --- ```{r, include=FALSE} +evalinr44 <- getRversion() >= '4.4.0' knitr::opts_chunk$set( collapse = TRUE, comment = "#>", @@ -612,7 +613,7 @@ The current plots being generated are not necessarily adequate because while the ### Using your own summary data -If you want to perform analysis with your local summary data (i.e. not in the OpenGWAS database) then use then look up the `mv_extract_exposures_local()` function in replace of the `mv_extract_exposures()` function. +If you want to perform analysis with your local summary data (i.e. not in the OpenGWAS database) then use then look up the `mv_extract_exposures_local()` function instead of the `mv_extract_exposures()` function. * * * @@ -633,7 +634,7 @@ ld_mat Here `ld_matrix()` returns the LD correlation values (not R^2^) for each pair of variants present in the 1000 genomes data set. -```{r eval=FALSE} +```{r} dat <- harmonise_data( exposure_dat = bmi_exp_dat, outcome_dat = chd_out_dat @@ -642,19 +643,19 @@ dat <- harmonise_data( Convert to the `MRInput` format for the MendelianRandomization package: -```{r eval=FALSE} +```{r eval=evalinr44} dat2 <- dat_to_MRInput(dat) ``` This produces a list of `MRInput` objects that can be used with the MendelianRandomization functions, e.g. -```{r eval=FALSE} +```{r eval=evalinr44} MendelianRandomization::mr_ivw(dat2[[1]]) ``` Alternatively, convert to the `MRInput` format but also obtaining the LD matrix for the instruments -```{r eval=FALSE} +```{r eval=evalinr44} dat2 <- dat_to_MRInput(dat, get_correlation = TRUE) MendelianRandomization::mr_ivw(dat2[[1]], correl = TRUE) ```