Description
This follows from a project at R Project Sprint 2023, the project page gives and overview of the issue and a link to an open access article for background reading: Enhancing sample.int for unequal probability sampling.
After R Project Sprint 2023 @dickoa wrapped up the prototype code into a package: https://github.com/dickoa/sondage.
@tslumley would like to pick this work up again, he says "I think the design is basically done, so it's a matter of integrating it into R".
This will likely involve preparing a patch to the relevant R, C and Rd (help) files and adding tests.
There are a few options for working collaborative on a patch:
- Make changes on a fork of the r-svn GitHub mirror and add collaborators to the fork and/or reviewers to a PR back to the r-svn mirror.
- Create the patch in the R Dev Container and use live share for collaboration.
As @tslumley will be remote at R Dev Day @ Hutch, and it is not confirmed if @dickoa can attend, the first approach is probably better in this case, allowing asynchronous collaboration. It is a bit trickier though - contributors will need to be able to build R on their own machine and there are some changes you need to make to the usual workflow:
-
Set
$TOP_SRCDIR
to the directory where you checked out your fork of the repository, e.g.:TOP_SRCDIR="$HOME/Repos/R-devel-fork"
-
From the build directory, before running make, update
$TOP_SRCDIR/Makefile.in
with the following call tosed
, so that the Subversion version number can be derived during the make.sed -i.bak "s|\$(GIT) svn info|$TOP_SRCDIR/.github/scripts/svn-info.sh|" "$TOP_SRCDIR/Makefile.in"
-
Ignore the changes to
Makefile.in
when making commits to your fork or when creating a patch from it, e.g.git diff --no-prefix ':!Makefile.in' > $HOME/patches/patch.diff