Install github package on safe haven server

I’ve had few enquires about how to install the summarizer package on a server without internet access, such as the NHS Safe Havens.

  1. Uploadsummarizer-master.zip from here to server.
  2. Unzip.
  3. Run this:


library(devtools)
source = devtools:::source_pkg("summarizer-master")
install(source)

Edit

As per comments, devtools::install_local() has previously failed, but may now also work directly.

4 Replies to “Install github package on safe haven server”

  1. Any reason not to just use devtools::install_local(...) instead? The source_pkg function is not exported from devtools, so it’s not intended for direct use (and in this case, not necessary).

  2. Hi Ewen,

    Is there some problem or is it just me?
    I tried to run

    devtools::install_github(“ewenharrison/finalfit”)

    but R says:
    “Downloading GitHub repo ewenharrison/finalfit@master
    from URL https://api.github.com/repos/ewenharrison/finalfit/zipball/master
    Installing finalfit
    “C:/Program Files/R/R-34~1.1/bin/x64/R” –no-site-file –no-environ –no-save \
    –no-restore –quiet CMD INSTALL \
    “C:/Users/mmet/AppData/Local/Temp/Rtmp40nvQF/devtoolsf9c59562f99/ewenharrison-finalfit-17f6518″ \
    –library=”C:/Program Files/R/R-3.4.1/library” –install-tests

    Komentoa C:\Program ei tunnistettu sis„iseksi tai ulkoiseksi komennoksi,
    suoritettavaksi ohjelmaksi tai komentojonotiedostoksi.
    Installation failed: Command failed (1)

    Second, I uploaded the zip-file and unzipped it.
    I tried to run

    library(devtools)
    source = devtools:::source_pkg(“summarizer-master”)
    install(source).

    R said:
    “> library(devtools)
    > source = devtools:::source_pkg(“summarizer-master”)
    Error: Does not appear to be an R package (no DESCRIPTION)
    > install(source)
    Error: path must be a string.”

    What I am doing wrong? Please help me.

    1. The path to R looks weird, is it really in a folder “/R-34~1.1/“
      With the second method, you need to include the path to the downloaded file in the source-pkg command.

Comments are closed.