title: Alternative to import() package in R?
body: <p>I'm using Rpy2 within python to call R but for some reason I am not able to load a a specific package, 'rmgarch'. I have installed it separately in R and it works when I import it in RStudio, but for whatever reason, it just doesn't wanna work in rpy2, even though rpy2 is perfectly happy importing other packages such as 'rugarch', 'Matrix', 'zoo', etc. They are all installed in the same library which is even more confusing for me.
  My question is, do you know an alternative way of calling/importing the package while coding in R? Note that I can import any other package. I tried using devtools because that's the only similar thing I can think of, but it doesn't exist in that universe. I am using R 4.0.3. Python version 3.7.6. An example of the use in Jupyter is:</p>
  <pre><code>import rpy2
  import rpy2.robjects as robjects
  from rpy2.robjects import pandas2ri
  from rpy2.robjects.conversion import localconverter
  
  utils.install_packages('rmgarch') #;utils.install_pa...rugarch,...
  robjects.r('''
          library('rugarch')
          library('quantmod')
          library('forecast')
          library('rmgarch')
          f &lt;- function(u) {
              l&lt;-u
          }
          ''')
  </code></pre>
  <p>The error output is:</p>
  <pre><code>RRuntimeError: Error in library(&quot;rmgarch&quot;) : there is no package called ‘rmgarch’
  </code></pre>