Learn R Programming

ergm (version 3.1.3)

eut-upgrade: Updating ergm.userterms prior to 3.1

Description

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.

Arguments

Explanation

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.

Instructions

The transition entails the following steps. They only need to be done once for a package. Future releases will keep up to date automatically.

  1. Download the up-to-dateergm.usertermssource from CRAN using, e.g.,download.packagesand unpack it.
  2. Copy the R and C files defining the user-written terms (usuallychangestats.user.h,changestats.user.c, andInitErgmTerm.user.R) andonlythose files from the oldergm.usertermssource code to the new. Donotcopy the boilerplate files that you did not modify.
  3. If you have customized the packageDESCRIPTIONfile (e.g., to change the package name) orzzz.R(e.g., to change the startup message), modify them as needed in the updatedergm.userterms, but donotsimply overwrite them with their old versions.
  4. Make sure that yourergminstallation is up to date, and rebuildergm.userterms.