Updating ergm.userterms prior to 3.1
Explanation and instructions for updating custom ERGM terms
developed prior to the release of
version 3.1 (including 3.0–999 preview release) to be used with versions 3.1 or later.
ergm.userterms — Statnet's
mechanism enabling users to write their own ERGM terms — comes in a
form of an R package containing files for the user to put their own
statistics into (i.e.,
InitErgmTerm.user.R), as well as
some boilerplate to support them (e.g.,
is stable, recent developments in ergm have necessitated the
boilerplate files in ergm.userterms to be updated. To reiterate, the
user-written statistic source code (
InitErgmTerm.user.R) can be used
without modification, but other files that came with the package need
to be changed.
To make things easier in the future, we have implemented a mechanism (using R's LinkingTo API, in case you are wondering) that will keep things in sync in releases after the upcoming one. However, for the upcoming release, we need to transition to this new mechanism.
The transition entails the following steps. They only need to be done once for a package. Future releases will keep up to date automatically.
Download the up-to-date
ergm.usertermssource from CRAN using, e.g.,
download.packagesand unpack it.
Copy the R and C files defining the user-written terms (usually
InitErgmTerm.user.R) and only those files from the old
ergm.usertermssource code to the new. Do not copy the boilerplate files that you did not modify.
If you have customized the package
DESCRIPTIONfile (e.g., to change the package name) or
zzz.R(e.g., to change the startup message), modify them as needed in the updated
ergm.userterms, but do not simply overwrite them with their old versions.
Make sure that your
ergminstallation is up to date, and rebuild