jointVIP
developmentWe (the authors of jointVIP
package) use the same contribution guide as the
popular tidyverse
ecosystem of R packages. This guide is a formal restatement.
The goal of this guide is to help you get up and contributing to jointVIP
as
quickly as possible. The guide is divided into two main pieces:
When filing an issue, the most important thing is to include a minimal reproducible example so that we can quickly verify the problem, and then figure out how to fix it. There are three things you need to include to make your example reproducible: required packages, data, code.
Packages should be loaded at the top of the script, so it's easy to see which ones the example needs.
The easiest way to include data is to use dput()
to generate the R code to recreate it.
dput(mtcars)
in RIn my reproducible script, type mtcars <-
then paste.
Spend a little bit of time ensuring that your code is easy for others to read:
You can check you have actually made a reproducible example by starting up a fresh R session and pasting your script in.
(Unless you've been specifically asked for it, please don't include the output
of sessionInfo()
.)
To contribute a change to jointVIP
, you follow these steps:
jointVIP
.Each of these steps are described in more detail below. This might feel overwhelming the first time you get set up, but it gets easier with practice.
If you're not familiar with git or GitHub, please start by reading http://r-pkgs.had.co.nz/git.html
Pull requests will be evaluated against a checklist:
Also include this motivation in NEWS
so that when a new release of
jointVIP
comes out it's easy for users to see what's changed. Add your
item at the top of the file and use markdown for formatting. The
news item should end with (@yourGithubUsername, #the_issue_number)
.
Each PR corresponds to a git branch, so if you expect to submit multiple changes make sure to create multiple branches. If you have multiple changes that depend on each other, start with the first one and don't submit any others until the first one has been processed.
Use jointVIP
coding style. To do so, please follow the official tidyverse
style guide. Maintaining a consistent style across the whole code base makes it much easier to jump into the code. If you're modifying existing jointVIP
code that doesn't follow the style guide, a separate pull request to fix the style would be greatly appreciated.
If you're adding new parameters or a new function, you'll also need to document them with roxygen2
. Make sure to re-run devtools::document()
on the code before submitting.
If fixing a bug or adding a new feature to a non-graphical function, please add a testthat unit test.
If you're adding a new graphical feature, please add a short example to the appropriate function.
This seems like a lot of work but don't worry if your pull request isn't perfect. It's a learning process. A pull request is a process, and unless you've submitted a few in the past it's unlikely that your pull request will be accepted as is. Please don't submit pull requests that change existing behavior. Instead, think about how you can add a new feature in a minimally invasive way.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.