Updating ergm.userterms prior to 3.1
Explanation and instructions for updating custom ERGM terms
developed prior to the release of ergm
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., changestats.user.h
,
changestats.user.c
, and InitErgmTerm.user.R
), as well as
some boilerplate to support them (e.g., edgetree.h
,
edgetree.c
, changestat.h
, changestat.c
, etc.).
Although the ergm.userterms
API
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 (changestats.user.h
,
changestats.user.c
, and 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.userterms
source from CRAN
using, e.g., download.packages
and unpack it.
Copy the R and C files defining the user-written terms
(usually changestats.user.h
, changestats.user.c
, and
InitErgmTerm.user.R
) and only those files from the old
ergm.userterms
source code to
the new. Do not copy the boilerplate files that you did not
modify.
If you have customized the package DESCRIPTION
file
(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 ergm
installation is up to date, and rebuild
ergm.userterms
.
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.