Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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.

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-date ergm.userterms source from CRAN using, e.g., download.packages and unpack it.

  2. 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.

  3. 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.

  4. Make sure that your ergm installation is up to date, and rebuild ergm.userterms.


ergm

Fit, Simulate and Diagnose Exponential-Family Models for Networks

v3.11.0
GPL-3 + file LICENSE
Authors
Mark S. Handcock [aut], David R. Hunter [aut], Carter T. Butts [aut], Steven M. Goodreau [aut], Pavel N. Krivitsky [aut, cre] (<https://orcid.org/0000-0002-9101-3362>), Martina Morris [aut], Li Wang [ctb], Kirk Li [ctb], Skye Bender-deMoll [ctb], Chad Klumb [ctb], Michał Bojanowski [ctb], Ben Bolker [ctb]
Initial release
2020-10-14

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.