how to get GitHub R package ?

Hello Dears,
I was trying to download a GitHab R package located at
but unfortunately I could not mange to do so. It would a great help if some could give me some tips to how to download and install to my R studio. Here below is the code I tried and warnings message.

Thank you so much for your help!

> library(devtools)
>  ulr = ""
> download.packages(pkgs = "DiffGraph",destdir = getwd(),
>                  repos = ulr, type = "source",
>                     method =  "internal")
> Warning: unable to access index for repository
>   scheme not supported in URL ''
> Warning in download.packages(pkgs = "DiffGraph", destdir = getwd(), repos = ulr,  :
>   no package ‘DiffGraph’ at

The url you linked contains the following instructions:

Install the DiffGraph pacakge:
Download the package source from
and then install the package using the following command:

install.packages("path/DiffGraph_1.1.1.tar.gz", type = "source")

where "path" is the path where the "DiffGraph_1.1.1.tar.gz" is located.

I have download and saved to my working directory and did the installation as follow.

install.packages("D:/Users/AB/Documents/ab/DiffGraph_1.1.1.tar.gz", type = "source")

However still getting this warning

Warning in install.packages :

  package ‘D:/Users/AB/Documents/ab/DiffGraph_1.1.1.tar.gz’ is not available for this version of R
A version of this package for your version of R might be available elsewhere,
see the ideas at

what version of R are you using? any idea what version of R this package might want?

I am now using the new R version (4.0.3). However, I also tried it with R version 4.0.2. The problem is the same. I am not sure what version is suitable for this package and haven't seen any specifications.

Since development of this package seems to have stalled back in 2017 maybe you can identify what version of r was current for the time and try that.

1 Like

Thanks for the help. However, if I can ask one more time on this.
I followed different approach from my earlier post. The code is below.

install_github("Zhangxf-ccnu/DiffGraph", subdir="pkg")

However, got the following error. This could be with my R or computer setting.
Can you one more time comment what is this error mean please?

Error: Failed to install 'DiffGraph' from GitHub:
  System command 'Rcmd.exe' failed, exit status: -1, stdout + stderr empty

I dont think the package developer set up their package to work with that.. thats why they wrote manual.install instructions...

Go to your Temp directory,
Remove prior downloaded package

and reinstall using


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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.