Search code examples
rgithubpackagedependencies

R package - How to specify a dependency version that is only available on github (AKA dev version)


I'm need to fix the Description file for an R package and I need to specify a specific version of imported package (i.e. Brobdingnag (>= 1.2-8) ).

But that version is not on Cran already (Cran has only up to 1.2-7) but is on github.

so I tried :

Imports:
     Brobdingnag  (>= 1.2-8)
Remotes:
    RobinHankin/Brobdingnag

But I predictably get:

checking package dependencies ... ERROR
  Package required and available but unsuitable version: ‘Brobdingnag’

And if I just use:

devtools::install_github("RobinHankin/Brobdingnag")

I get the 1.2-8 version without needing to specify it.

Any idea how to solve this ?

Thanks, David


Solution

  • I think specifying this would solve your problem

    Imports:
         Brobdingnag  (>= 1.2.8)
    Remotes:
        RobinHankin/Brobdingnag@HEAD