David T
David T

Reputation: 2143

How to load a git branch from another R package

In R, how I load one package's git branch from another package?

There are two packages, call them producer and consumer1. I am refactoring my code by moving a bunch of function definitions and tests from producer to consumer1.

I'm creating git branches, rfctrProd and rfctrCons1 for producer and consumer1. In rfctrCons1, I need a statement doing something like

#` @import producer, gitBranch = rfctrProd

Also, I'll to do similarly with other packages which import producer, to make sure I haven't broken them either. (I think the functions I'm refactoring are only used by consumer1, but I want to be sure before I merge my changes.)

Upvotes: 0

Views: 350

Answers (1)

caldwellst
caldwellst

Reputation: 5956

You don't use roxygen comments to specify the import branch, just the functions themselves. You can specify the branch in the DESCRIPTION file, under Remotes:. Assuming it's Github (the default), you can do:

Remotes:
  username/producer/rfctrProd

If it's not Github, have a look here for the other syntax.

Upvotes: 1

Related Questions