guido-s / meta

Official Git repository of R package meta
http://cran.r-project.org/web/packages/meta/index.html
GNU General Public License v2.0
82 stars 32 forks source link

Vignette - Figure 4 error, formal argument "type.study" matched by multiple actual arguments #58

Closed melindahiggins2000 closed 7 months ago

melindahiggins2000 commented 7 months ago

Note: for support questions on R package meta, please use the R-sig-meta-analysis mailing list. This repository's issues are reserved for feature requests and bug reports.

Classification of issue

Please indicate whether you want to submit a

Summary

Please describe the feature request or bug.

When running the vignette https://cran.r-project.org/web/packages/meta/vignettes/meta-tutorial.pdf the code to make Figure 4 has an error.

Additional information

Please provide additional information (especially for bugs) like

# R code to reproduce the bug
forest(mbr, xlim = c(0.5, 4),
       leftcols = c("studlab", "I2.w", "tau2.w", "Q.w", "pval.Q.w"),
       leftlab = c("Meta-Analysis Method", "I2", "Tau2", "Q", "P-value"),
       type.study = "diamond",
       digits.addcols = c(4, 2, 2, 2), just.addcols = "right",
       file = "figure4.pdf", width = 10)

as well as any relevant output from R

Error in forest.meta(m.forest, leftcols = leftcols, leftlabs = leftlabs,  : 
  formal argument "type.study" matched by multiple actual arguments

or an informative screenshot.

image

Environment

For bug reports, please mention your

Alternatively, you could run the following command and in the auto-generated e-mail mention that you opened a bug report on GitHub.

sessionInfo()

Output

> sessionInfo()
R version 4.3.2 (2023-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 11 x64 (build 22000)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8 
[2] LC_CTYPE=English_United States.utf8   
[3] LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.utf8    

time zone: America/New_York
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] metasens_1.5-2 meta_7.0-0     metadat_1.2-0 

loaded via a namespace (and not attached):
 [1] Matrix_1.6-5        dplyr_1.1.4         compiler_4.3.2     
 [4] tidyselect_1.2.1    Rcpp_1.0.12         xml2_1.3.6         
 [7] stringr_1.5.1       metafor_4.6-0       splines_4.3.2      
[10] boot_1.3-29         lattice_0.22-5      readr_2.1.5        
[13] R6_2.5.1            generics_0.1.3      MASS_7.3-60.0.1    
[16] tibble_3.2.1        nloptr_2.0.3        minqa_1.2.6        
[19] pillar_1.9.0        tzdb_0.4.0          rlang_1.1.3        
[22] utf8_1.2.4          stringi_1.8.3       mathjaxr_1.6-0     
[25] cli_3.6.2           magrittr_2.0.3      grid_4.3.2         
[28] rstudioapi_0.15.0   hms_1.1.3           lme4_1.1-35.1      
[31] lifecycle_1.0.4     CompQuadForm_1.4.3  nlme_3.1-164       
[34] vctrs_0.6.5         glue_1.7.0          numDeriv_2016.8-1.1
[37] fansi_1.0.6         purrr_1.0.2         tools_4.3.2        
[40] pkgconfig_2.0.3

Thank you for your time and attention to this bug in the vignette.

guido-s commented 7 months ago

Thank you for pointing out this bug. Should be fixed with https://github.com/guido-s/meta/commit/fdf87b6545aeb233ac0c8ba6017fd6ccb9541dea .

melindahiggins2000 commented 7 months ago

@guido-s Thank you!! I downloaded the update. Figure 4 in the Vignette works now.