From e38660c4f28ded548eaaf09e5046956d82a0a1cc Mon Sep 17 00:00:00 2001 From: Tom Palmer Date: Thu, 26 Sep 2024 16:09:56 +0100 Subject: [PATCH] Catch server non-response --- vignettes/perform_mr.Rmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vignettes/perform_mr.Rmd b/vignettes/perform_mr.Rmd index b8046a05..e2701a2b 100644 --- a/vignettes/perform_mr.Rmd +++ b/vignettes/perform_mr.Rmd @@ -656,8 +656,8 @@ MendelianRandomization::mr_ivw(dat2[[1]]) Alternatively, convert to the `MRInput` format but also obtaining the LD matrix for the instruments ```{r eval=evalinr44} -dat2 <- dat_to_MRInput(dat, get_correlation = TRUE) -MendelianRandomization::mr_ivw(dat2[[1]], correl = TRUE) +dat2 <- try(dat_to_MRInput(dat, get_correlation = TRUE)) +if (class(dat2) != "try-error") MendelianRandomization::mr_ivw(dat2[[1]], correl = TRUE) ``` * * *