Skip to content

Instantly share code, notes, and snippets.

@explodecomputer
Created November 5, 2015 21:13
Show Gist options
  • Save explodecomputer/4c52798f273d02274b89 to your computer and use it in GitHub Desktop.
Save explodecomputer/4c52798f273d02274b89 to your computer and use it in GitHub Desktop.
MR base

Working on MR base

The TwoSampleMR package is sitting here:

https://scmv-ieugit.epi.bris.ac.uk/gh13047/mr_base

The following people currently have access as 'Masters' on this repository:

  • Gib Hemani
  • Tom Gaunt
  • Hash Shihab
  • Chris Zheng
  • Charles Laurin
  • Philip Haycock
  • Kaitlin Wade
  • Katherine Tansey

R package development

We talked about how to develop within an R package, but have a look at this link for more information or a general guide:

http://r-pkgs.had.co.nz/

It has lots of information about how to write packages, using the R/devtools library. Quick synopsis below on.

In terminal:

cd /path/to/mr_base

then in R, to load the package

library(devtools)
load_all()

If you make changes to the source code then running load_all() will update the loaded package to register the changes. To install:

install()

Using git

Getting started

There are some good interactive starter guides:

Here are some instructions on how to set up the authentication:

https://help.github.com/articles/set-up-git/

As you can see there are two options - using the password or using SSH keys. I've never tried it with the password, maybe Hash has some pointers if you are struggling with this.

Working practice

Because potentially a few of us are going to be working on this together here are some guidelines:

  • If you are working on something then assign the issue to yourself
  • Try to work on that issue on a specific branch
  • Try to use commits relatively frequently and at meaningful points of development
  • Avoid pushing commits if the R package won't build. e.g. make sure that the package can always be loaded/installed at the
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment