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

forest.meta() not exported #56

Closed thlytras closed 10 months ago

thlytras commented 10 months ago

First of all thank you for a wonderful package.

In the new (7.0) version of meta, it seems that method forest.meta() is not exported in the namespace, which is breaking my package miniMeta (a Shiny frontend for meta).

I'm not sure why forest.meta() is not exported and if this is necessary, but I think there may not be a workaround to keep miniMeta operational. Thus, could you re-export forest.meta() in your namespace? And if not, maybe try to suggest a workaround for me...?

Many thanks, Theodore Lytras

thlytras commented 10 months ago

In case it is helpful:

> meta::forest.meta
Error: 'forest.meta' is not an exported object from 'namespace:meta'
> meta::forest
function (x, ...) 
UseMethod("forest")
<bytecode: 0x558f7f907358>
<environment: namespace:metafor>
> metafor::forest
function (x, ...) 
UseMethod("forest")
<bytecode: 0x558f7f907358>
<environment: namespace:metafor>

Thus for some reason meta "points" to metafor when the forest method is invoked??

guido-s commented 10 months ago

I sent you a pull request in October 2023 fixing this error: https://github.com/thlytras/miniMeta/pulls

R function forest() is a generic function. Accordingly, instead of calling forest.meta() directly, one should rely on forest(). In order to work side by side and not to print a warning concerning a masked function, meta calls forest() from metafor.

thlytras commented 10 months ago

THANK YOU! Much appreciated. And sorry for missing your pull request. Apparently you're much more of an expert in both R package development and working with github than I am.