From 11c2943ecd12c3bcb04d189b6006e69d55aa0a91 Mon Sep 17 00:00:00 2001 From: Tom Palmer Date: Tue, 19 Apr 2022 14:05:57 +0100 Subject: [PATCH 1/5] Amend class() to inherits() --- R/fsw.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/fsw.R b/R/fsw.R index 874cc53..23bb309 100644 --- a/R/fsw.R +++ b/R/fsw.R @@ -92,7 +92,7 @@ fsw.ivreg <- function(object) { "ivreg(y ~ log(x1) + x2 | z1 + z2 + z3)", "please create dat$logx1 = log(x1) in your data.frame", "and fit ivreg(y ~ logx1 + x2 | z1 + z2 + z3).") - if (class(condmod) == "try-error") stop(condmoderrmsg) + if (inherits(condmod, "try-error")) stop(condmoderrmsg) condres <- condmod$residuals if (nexogenous > 0) { resfor <- as.formula(paste("condres", "~", instrplus, "+", exogplus)) From 4befc1f36373209014027862c51ffc4bf5311e94 Mon Sep 17 00:00:00 2001 From: Tom Palmer Date: Tue, 19 Apr 2022 14:13:43 +0100 Subject: [PATCH 2/5] usethis::use_tidy_description() --- DESCRIPTION | 42 ++++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 94effaf..df14f87 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,29 +1,23 @@ Package: OneSampleMR -Title: One Sample Mendelian Randomization and Instrumental Variable Analyses +Title: One Sample Mendelian Randomization and Instrumental Variable + Analyses Version: 0.1.0 -Authors@R: - c(person(given = "Tom", - family = "Palmer", - role = c("aut", "cre"), - email = "remlapmot@hotmail.com", - comment = c(ORCID = "0000-0003-4655-4511")), - person(given = "Wes", - family = "Spiller", - role = "aut", - email = "wes.spiller@bristol.ac.uk", - comment = c(ORCID = "0000-0002-8169-5531")), - person(given = "Eleanor", - family = "Sanderson", - role = "aut", - email = "eleanor.sanderson@bristol.ac.uk", - comment = c(ORCID = "0000-0001-5188-5775"))) -Description: Useful functions for one-sample (individual level data) Mendelian randomization and - instrumental variable analyses. The package includes implementations of; the Sanderson and - Windmeijer (2016) conditional F-statistic, the - multiplicative structural mean model Hernán and Robins (2006) - , and two-stage predictor substitution and two-stage - residual inclusion estimators explained by Terza et al. (2008) - . +Authors@R: c( + person("Tom", "Palmer", , "remlapmot@hotmail.com", role = c("aut", "cre"), + comment = c(ORCID = "0000-0003-4655-4511")), + person("Wes", "Spiller", , "wes.spiller@bristol.ac.uk", role = "aut", + comment = c(ORCID = "0000-0002-8169-5531")), + person("Eleanor", "Sanderson", , "eleanor.sanderson@bristol.ac.uk", role = "aut", + comment = c(ORCID = "0000-0001-5188-5775")) + ) +Description: Useful functions for one-sample (individual level data) + Mendelian randomization and instrumental variable analyses. The + package includes implementations of; the Sanderson and Windmeijer + (2016) conditional F-statistic, + the multiplicative structural mean model Hernán and Robins (2006) + , and two-stage predictor + substitution and two-stage residual inclusion estimators explained by + Terza et al. (2008) . License: GPL (>= 3) URL: https://github.com/remlapmot/OneSampleMR BugReports: https://github.com/remlapmot/OneSampleMR/issues/ From f226f3473118154fc86036f5f07858c7f2caf92a Mon Sep 17 00:00:00 2001 From: Tom Palmer Date: Tue, 19 Apr 2022 14:13:56 +0100 Subject: [PATCH 3/5] Add pkgdown site to URL --- DESCRIPTION | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index df14f87..ddc8096 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -19,7 +19,8 @@ Description: Useful functions for one-sample (individual level data) substitution and two-stage residual inclusion estimators explained by Terza et al. (2008) . License: GPL (>= 3) -URL: https://github.com/remlapmot/OneSampleMR +URL: https://github.com/remlapmot/OneSampleMR, + https://remlapmot.github.io/OneSampleMR/ BugReports: https://github.com/remlapmot/OneSampleMR/issues/ Depends: R (>= 3.6.0) From efbe0f427dff8554cfcaacbbbedfcf9832412d90 Mon Sep 17 00:00:00 2001 From: Tom Palmer Date: Tue, 19 Apr 2022 16:26:24 +0100 Subject: [PATCH 4/5] Bump version --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index ddc8096..708ad31 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: OneSampleMR Title: One Sample Mendelian Randomization and Instrumental Variable Analyses -Version: 0.1.0 +Version: 0.1.1 Authors@R: c( person("Tom", "Palmer", , "remlapmot@hotmail.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-4655-4511")), From d26ddebe822e5c08b2f47012e542cfc83cf76238 Mon Sep 17 00:00:00 2001 From: Tom Palmer Date: Tue, 19 Apr 2022 16:26:42 +0100 Subject: [PATCH 5/5] Add v0.1.1 bullet --- NEWS.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS.md b/NEWS.md index a416eca..97d67f0 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# OneSampleMR 0.1.1 + +* Fix an issue causing an R CMD check note in R 4.2.0 + # OneSampleMR 0.1.0 * Initial submission to CRAN