I'm having problems loading RTransferEntropy in RStudio

I'm new to R, having worked primarily with Python and Matlab. I'm interested in using the RTransferEntropy package.

I was able to download and install it in R via


I typed library("RTransferEntropy"), which was successful.

However, in RStudio, library("RTransferEntropy") indicates no such package exists.

Is there something additional I need to do in RStudio? I did try installing the package first in RStudio, but that didn't work, and I received a lengthy error message. This is why I installed in R.

It seems like you are using a different package library path on RStudio check if .libPaths()match both in R and Rstudio.

No, they don't match.

In R: "/Library/Frameworks/R.framework/Versions/3.6/Resources/library"

In RStudio: "/Users/fishbacp/anaconda3/lib/R/library"

I tried in R to set the installation path to RStudio's as follows:

install.packages("RTransferEntropy", lib="/Users/fishbacp/anaconda3/lib/R/library")

My thinking was that this directory is where RStudio would look for installed packages. This is what happened after I restarted R in RStudio and typed


Error: package or namespace load failed for ‘RTransferEntropy’ in rbind(info, getNamespaceInfo(env, "S3methods")):

  • number of columns of matrices must match (see arg 2)*
    In addition: Warning message:
    package ‘RTransferEntropy’ was built under R version 3.6.0

My version of R is 3.6.0.

You have installed Rstudio through Anaconda, they use independent environments so the stand-alone R version you have installed is not the same that is used by Anaconda, also you are supposed to install packages using Anaconda management tools since Anaconda doesn't play well with CRAN repositories and Rstudio doesn't officially support Anaconda.
Unless you have a good reason for using RStudio trought Anaconda, I will strongly recommend you to use a stand-alone installation instead.

1 Like

Thank you @andresrcs. I will use a stand-alone version as you suggest.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.