OHDSI Home | Forums | Wiki | Github

How to install OHDSI R packages without internet connection


(mintmountain89) #1

Hi there,

I’m currently looking into network studies carried out by OHDSI and it seems that most of the network studies use R-packages on the OHDSI github. If I am not mistaken we need to install the packages via R-studio, using the install_github commands.

One such example is the ticagrelor vs clopidogrel study here: https://github.com/chandryou/TicagrelorVsClopidogrel

Due to our computers having no internet connection, I am wondering if there is another way to install these packages offline. Does anyone have any experience doing so, and did you encounter any issues along the way? If so, how did you resolve them?

Thanks!
Regards,
Hui Xing


(Martijn Schuemie) #2

All the OHDSI source packages are available in the drat repository, that would be my best bet for installing packages offline. The biggest challenge is the dependencies of those packages that live in CRAN.

There’s a function called insertEnvironmentSnapshotInPackage in the OhdsiRTools package that creates a list of all packages (and version numbers) that need to be installed to run a study, and adds that list to the study package. An example can be found here. @SCYou: would you mind running that function on the TicagrelorVsClopidogrel package?


(Seng Chan You) #3

@schuemie Of course, I don’t mind. And I’ll let you know the result and

Thank you @hui_xing_tan for showing interest in my study.

I executed the ticagrelor study inside the very secured system, which has no internet connection either.
This is the way I took for this very study (Since I’m not an R expert, it would be easy and you can do this! :laughing:):

  1. I prepared another computer which have internet access (computer B)
  2. Install R on computer B. R version should be same between two computers.
  3. Install ticagrelor R package and other dependent R packages (I’ll let you know the exact version of the dependent packages after running the environmentSnopShot) on computer B.
  4. copy the whole R packages of computer B (usually inside the ‘document /R /win-library/3.5/’ if your OS is Window) and paste it to the off-line computer.

(Seng Chan You) #4

@hui_xing_tan You can see the dependent packages for TicagrelorVsClopidogrel study here

Thank you @schuemie :slight_smile:


t