error when trying to install r package and load it

Issue #430 invalid
john
created an issue

I am trying to use the r package called "huge". I am having a problem in rpy2 in that I am trying to install this package, which the code runs fine using the following code:

/home/johnzhou/anaconda3/envs/python35/lib/python3.5/site-packages/rpy2/rinterface/__init__.py:145: RRuntimeWarning: also installing the dependency igraph


  warnings.warn(x, RRuntimeWarning)
/home/johnzhou/anaconda3/envs/python35/lib/python3.5/site-packages/rpy2/rinterface/__init__.py:145: RRuntimeWarning: trying URL 'https://cloud.r-project.org/src/contrib/igraph_1.1.2.tar.gz'

  warnings.warn(x, RRuntimeWarning)
/home/johnzhou/anaconda3/envs/python35/lib/python3.5/site-packages/rpy2/rinterface/__init__.py:145: RRuntimeWarning: Content type 'application/x-gzip'
  warnings.warn(x, RRuntimeWarning)
/home/johnzhou/anaconda3/envs/python35/lib/python3.5/site-packages/rpy2/rinterface/__init__.py:145: RRuntimeWarning:  length 3376958 bytes (3.2 MB)

  warnings.warn(x, RRuntimeWarning)
/home/johnzhou/anaconda3/envs/python35/lib/python3.5/site-packages/rpy2/rinterface/__init__.py:145: RRuntimeWarning: =
  warnings.warn(x, RRuntimeWarning)
/home/johnzhou/anaconda3/envs/python35/lib/python3.5/site-packages/rpy2/rinterface/__init__.py:145: RRuntimeWarning: 

  warnings.warn(x, RRuntimeWarning)
/home/johnzhou/anaconda3/envs/python35/lib/python3.5/site-packages/rpy2/rinterface/__init__.py:145: RRuntimeWarning: downloaded 3.2 MB


  warnings.warn(x, RRuntimeWarning)
/home/johnzhou/anaconda3/envs/python35/lib/python3.5/site-packages/rpy2/rinterface/__init__.py:145: RRuntimeWarning: trying URL 'https://cloud.r-project.org/src/contrib/huge_1.2.7.tar.gz'

  warnings.warn(x, RRuntimeWarning)
/home/johnzhou/anaconda3/envs/python35/lib/python3.5/site-packages/rpy2/rinterface/__init__.py:145: RRuntimeWarning:  length 2946819 bytes (2.8 MB)

  warnings.warn(x, RRuntimeWarning)
/home/johnzhou/anaconda3/envs/python35/lib/python3.5/site-packages/rpy2/rinterface/__init__.py:145: RRuntimeWarning: downloaded 2.8 MB


  warnings.warn(x, RRuntimeWarning)
/home/johnzhou/anaconda3/envs/python35/lib/python3.5/site-packages/rpy2/rinterface/__init__.py:145: RRuntimeWarning: 
  warnings.warn(x, RRuntimeWarning)
/home/johnzhou/anaconda3/envs/python35/lib/python3.5/site-packages/rpy2/rinterface/__init__.py:145: RRuntimeWarning: The downloaded source packages are in
    /tmp/RtmpOb6GhL/downloaded_packages
  warnings.warn(x, RRuntimeWarning)
/home/johnzhou/anaconda3/envs/python35/lib/python3.5/site-packages/rpy2/rinterface/__init__.py:145: RRuntimeWarning: Updating HTML index of packages in '.Library'

  warnings.warn(x, RRuntimeWarning)
/home/johnzhou/anaconda3/envs/python35/lib/python3.5/site-packages/rpy2/rinterface/__init__.py:145: RRuntimeWarning: Making 'packages.html' ...
  warnings.warn(x, RRuntimeWarning)
/home/johnzhou/anaconda3/envs/python35/lib/python3.5/site-packages/rpy2/rinterface/__init__.py:145: RRuntimeWarning:  done

  warnings.warn(x, RRuntimeWarning)

However, when I try to load the package using:

rpy2.robjects.packages.importr("huge")

I get an error message where it tells me that:

RRuntimeError                             Traceback (most recent call last)
<ipython-input-104-843fb8da3355> in <module>()
----> 1 rpy2.robjects.packages.importr("huge")

~/anaconda3/envs/python35/lib/python3.5/site-packages/rpy2/robjects/packages.py in importr(name, lib_loc, robject_translations, signature_translation, suppress_messages, on_conflict, symbol_r2python, symbol_check_after, data)
    451     if _package_has_namespace(rname, 
    452                               _system_file(package = rname)):
--> 453         env = _get_namespace(rname)
    454         version = _get_namespace_version(rname)[0]
    455         exported_names = set(_get_namespace_exports(rname))

RRuntimeError: Error in loadNamespace(name) : there is no package called huge

I would greatly appreciate some help with this.

Thanks

Comments (3)

  1. Log in to comment