I am working with the GMCM package of R in Python using rpy2. There are a few internal functions of GMCM package which can be accessed only using the ::: operator. For example the function qgmm.marginal cannot be accessed using rpy2 in the usual way.
Here is my Python code:
import rpy2
import rpy2.robjects as robjects
from rpy2.robjects.packages import importr
gmcm_r = importr('GMCM')
data_r = gmcm_r.SimulateGMCMData(n = 100, m =3, d=2)
print(gmcm_r.Uhat(data_r.rx2('z'))) # works
print(gmcm_r.qgmm.marginal(gmcm_r.Uhat(data_r.rx2('z')))) # does not work
# AttributeError: module 'GMCM' has no attribute 'qgmm'
The corresponding R code is
library(GMCM)
data = SimulateGMCMData(n = 100, m =3, d=2)
u = Uhat(data$z) #works
GMCM:::qgmm.marginal(u, theta)#works
How do we access these internal functions using rpy2?