2024-02-08
- R Development Guide: https://contributor.r-project.org/rdevguide/
- R's Bugzilla: https://bugs.r-project.org
- R Project Weblate server: https://translate.rx.studio/projects/r-project
- R sources - SVN repo: https://svn.r-project.org/R/trunk/
- GitHub mirror: https://github.com/r-devel/r-svn/
- GitHub Codespace (R Dev Container) https://github.com/r-devel/r-dev-env
- R-devel mailing list archives: https://stat.ethz.ch/pipermail/r-devel/, searchable GitHub repo: https://github.com/MichaelChirico/r-mailing-list-archive/tree/master/r-devel
- Minutes from previous office hours: https://github.com/r-devel/rcontribution/tree/main/office_hours
- Annotated list of bugs: https://docs.google.com/spreadsheets/d/1bhfPIJQXeKpydigMH79FKIkdHO9NxlBSB_bTRoCFnPY/edit#gid=0
- Twitter: https://twitter.com/R_Contributors
- Mastodon: https://hachyderm.io/@R_Contributors
- Slack: https://contributor.r-project.org/slack
Please tell us a bit about yourself, following the template below:
Name: Heather Turner
Country I am currently in: UK
Something we could do or discuss together today: Bug 1161
Name: Tomasz Gieorgijewski
Country I am currently in: Poland
Something we could do or discuss together today:
Name: Ella Kaye
Country I am currently in: UK
Something we could do or discuss together today: I'm happy to give an update on the penguins/gait patch.
Name: Joakim
Country I am currently in: Turkey
Something we could do or discuss together today:
Name: Vaibhav
Country I am currently in: India
Something we could do or discuss together today:
Name: Munawar
Country I am currently in: UK
Something we could do or discuss together today: GSoC/GSoD
Name: Brian Terry
Country I am currently in: UK
-
Is proposing to add palmerpenguins dataset to R. Patch adding the dataset is with an R Core member for review.
-
Has also prepared report to show this data may be used to reproduce some of the analysis from the orginal paper, as a way to validate the data
-
Take a look at Ella's patch: r-devel/r-svn#154. The GitHub mirror (github.com/r-devel/r-svn) of the of the official SVN repository (https://svn.r-project.org/R/trunk/) enables other people to review the patch and it is also possible to create a patch file from this which can be applied to the original Subversion repository by R Core (see https://contributor.r-project.org/rdevguide/FixBug.html#using-a-git-mirror).
-
Can use
tools::checkRd
to check the syntax of an Rd file.
-
-
Has been working on updating examples to use penguins data rather than iris
- Some examples use
iris3
which is an artificial reformatting of iris data as 3-way data set. So proposing to also add gait data as an alternative to this
- Some examples use
-
Challenges.
- Building R on the mac: working on documentation here: https://github.com/r-devel/rcwg/blob/main/working_documents/comments_on_install_r_macOS.md
- R Core member who is reviewing this work wanted separate patches for the penguins and gait data. Unfortunately cannot make two forks of SVN mirror (github.com/r-svn), so worked locally for the gait data.
-
Question: what is the difference between the GitHub Mirror and the Subversion repo?
- The mirror can be a useful tool for contributors, especially when you want to share the code with other people for review. Patches created from the mirror include some git-specific text, but are compatible with SVN.
- The actual sources are version controlled under SVN, so an svn-compatible patch must be created to propose a patch to R Core (this proposal is usually done via Bugzilla, see below).
- Only R Core members can make commits to the SVN repo.
- The GitHub mirror mostly shows mirrored commits by R core members, plus occasional commits by Jeroen Ooms, who maintains the GitHub mirror. There is some GitHub-specific code in the
.github
folder that implements the mirroring of the SVN repo.
- Adding something new to R (as in Ella's patch) is something that contributors rarely work on - usually only R Core members do this. The more usual path for contributors is to work on bugs in R.
- We looked at https://bugs.r-project.org and an example bug from the unofficial annotated bug list https://docs.google.com/spreadsheets/d/1bhfPIJQXeKpydigMH79FKIkdHO9NxlBSB_bTRoCFnPY/edit#gid=0. We saw that a patch (.diff) file can be added as a comment and people reading the bug report can view a visual diff in the browser.
- Mentioned short video on contributor home page (https://contributor.r-project.org/) that gives some pointers on finding a bug to work on.
-
Heather was set up with an RStudio project that had a local copy of her fork of the GitHub mirror, i.e. a local copy of https://github.com/hturner/r-svn. This meant we could look at her local copy of the R sources, in particular the source file for
persp()
, which is insrc/library/graphics/R
. -
First we looked at the help file for
persp
, which says: "If x is a list, its components x$x and x$y are used for x and y, respectively.". -
Then we tried to make a reproducible example, based on the first example in the help file. Original example:
x <- seq(-10, 10, length.out = 30) y <- x f <- function(x, y) { r <- sqrt(x^2+y^2); 10 * sin(r)/r } z <- outer(x, y, f) op <- par(bg = "white") persp(x, y, z, theta = 30, phi = 30, expand = 0.5, col = "lightblue")
with a list for x:
persp(x = list(x = seq(-10, 10, length.out = 30), y = y), z = z, theta = 30, phi = 30, expand = 0.5, col = "lightblue")
-
We then looked at the source code
persp()
to try to understand what's happening:if (is.null(xlab)) xlab <- if (!missing(x) && is.name(substitute(x))) deparse1(substitute(x)) else "X"
How can we ever get to the
else
condition? Turns out we can dropx
and the plot looks the same apart from having the x label "X"persp(y = y, z = z, theta = 30, phi = 30, expand = 0.5, col = "lightblue")
presumably x defaults to sequence 1, 2, ...
-
At first we (Heather!) thought that the original poster (OP) objected to having an expression for an axis label rather than a name and we tried editing
persp.default
to only deparse x when it was a name. However we realized that an expression is also used as the label for the case whenx
is not a list. Also this behaviour is more general, e.g.plot()
will also use an expression as the axis label by default. -
After some discussion, and reviewing the bug report again, we realized that the issue was that it didn't make sense to label an axis (1 dimension) by a list of x and y (2 dimensions). It would make more sense to unpack the list, then continue as if x and y had been specified as separate arguments.
-
Heather also noted that it is possible to specify a list of x, y and z values, e.g.
persp(x = list(x = seq(-10, 10, length.out = 30), y = y, z = z),
theta = 30, phi = 30, expand = 0.5, col = "lightblue")
This behaviour is undocumented.
- Munawar volunteered to work on a fix following the idea to unpack the elements of the list somehow.
- Heather mentioned the #work-out-loud channel on Slack, which can be used to discuss contributions people are working on, for feedback/help along the way.