Skip to content

Commit

Permalink
Fixes to some CRAN check complaints.
Browse files Browse the repository at this point in the history
references #542
  • Loading branch information
krivit committed Nov 28, 2023
1 parent 36cd62a commit 8f463ef
Show file tree
Hide file tree
Showing 27 changed files with 45 additions and 59 deletions.
31 changes: 16 additions & 15 deletions R/InitErgmProposal.R
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ InitErgmProposal.BDStratTNT <- function(arguments, nw) {
#' @templateVar name CondDegree
#' @aliases InitErgmProposal.CondDegree
#' @title MHp for degree constraints
#' @description MHp for \eqn{constraints= ~degree}. Propose either 4 toggles (MH_CondDegreeTetrad) or 6 toggles
#' @description MHp for `constraints= ~degree`. Propose either 4 toggles (MH_CondDegreeTetrad) or 6 toggles
#' (MH_CondDegreeHexad) at once. For undirected networks, propose 4 toggles (MH_CondDegreeTetrad).
#' MH_CondDegreeTetrad selects two edges with no nodes in common, A1-A2 and B1-B2, s.t. A1-B2 and B1-A2 are
#' not edges, and propose to replace the former two by the latter two. MH_CondDegreeHexad selects three edges
Expand All @@ -212,7 +212,7 @@ InitErgmProposal.CondDegree <- function(arguments, nw) {
#' @templateVar name CondDegreeMix
#' @aliases InitErgmProposal.CondDegreeMix
#' @title MHp for degree mix constraints
#' @description MHp for \eqn{constraints= ~degreesmix}. Similar to `InitErgmProposal.CondDegree`, except that
#' @description MHp for `constraints= ~degreesmix`. Similar to `InitErgmProposal.CondDegree`, except that
#' the toggle is proposed only if the mixing matrix of degrees is preserved before and after the toggle.
#' @template ergmProposal-general
NULL
Expand All @@ -225,7 +225,7 @@ InitErgmProposal.CondDegreeMix <- function(arguments, nw) {
#' @templateVar name CondOutDegree
#' @aliases InitErgmProposal.CondOutDegree
#' @title MHp for odegree constraints
#' @description MHp for \eqn{constraints= ~odegrees}. For directed networks, randomly select two dyads with a
#' @description MHp for `constraints= ~odegrees`. For directed networks, randomly select two dyads with a
#' common tail node, one having an edge and one not, and propose to swap the tie from one head to the other.
#' @template ergmProposal-general
NULL
Expand All @@ -240,7 +240,7 @@ InitErgmProposal.CondOutDegree <- function(arguments, nw) {
#' @templateVar name CondInDegree
#' @aliases InitErgmProposal.CondInDegree
#' @title MHp for idegree constraints
#' @description MHp for \eqn{constraints= ~idegrees}. For directed networks, randomly select two dyads with a
#' @description MHp for `constraints= ~idegrees`. For directed networks, randomly select two dyads with a
#' common head node, one having an edge one not, and propose to swap the tie from one tail to the other.
#' @template ergmProposal-general
NULL
Expand All @@ -255,8 +255,8 @@ InitErgmProposal.CondInDegree <- function(arguments, nw) {
#' @templateVar name CondB1Degree
#' @aliases InitErgmProposal.CondB1Degree
#' @title MHp for b1degree constraints
#' @description MHp for \eqn{constraints= ~b1degrees}. For bipartite networks, randomly select an edge {B1i, B2j}
#' and an empty dyad with the same node B1i, {B1i, B2k}, and propose to toggle both {B1i, B2j} and {B1i, B2k}.
#' @description MHp for `constraints= ~b1degrees`. For bipartite networks, randomly select an edge (B1i, B2j)
#' and an empty dyad with the same node B1i, (B1i, B2k), and propose to toggle both (B1i, B2j) and (B1i, B2k).
#' This ensures that the degrees of individual nodes in mode 1 are preserved.
#' @template ergmProposal-general
NULL
Expand All @@ -271,8 +271,8 @@ InitErgmProposal.CondB1Degree <- function(arguments, nw) {
#' @templateVar name CondB2Degree
#' @aliases InitErgmProposal.CondB2Degree
#' @title MHp for b2degree constraints
#' @description MHp for \eqn{constraints= ~b2degrees}. For bipartite networks, randomly select an edge {B1j, B2i}
#' and an empty dyad with the same node B2i, {B1k, B2i}, and propose to toggle both {B1j, B2i} and {B1k, B2i}.
#' @description MHp for `constraints= ~b2degrees`. For bipartite networks, randomly select an edge (B1j, B2i)
#' and an empty dyad with the same node B2i, (B1k, B2i), and propose to toggle both (B1j, B2i) and (B1k, B2i).
#' This ensures that the degrees of individual nodes in mode 2 are preserved.
#' @template ergmProposal-general
NULL
Expand All @@ -286,7 +286,7 @@ InitErgmProposal.CondB2Degree <- function(arguments, nw) {
#' @templateVar name CondDegreeDist
#' @aliases InitErgmProposal.CondDegreeDist
#' @title MHp for degreedist constraints
#' @description MHp for \eqn{constraints= ~degreedist}. Randomly select a node (T) and its edge (E). If the head
#' @description MHp for `constraints= ~degreedist`. Randomly select a node (T) and its edge (E). If the head
#' node of the edge (H) has 1 degree more than another randomly select node (A), and A is disconnected to both
#' T and H, then propose to toggle E and the dyad between T and A.
#' @template ergmProposal-general
Expand All @@ -307,7 +307,7 @@ InitErgmProposal.CondDegreeDist <- function(arguments, nw) {
#' @templateVar name CondInDegreeDist
#' @aliases InitErgmProposal.CondInDegreeDist
#' @title MHp for idegreedist constraints
#' @description MHp for \eqn{constraints= ~idegreedist}. For directed networks, similar to
#' @description MHp for `constraints= ~idegreedist`. For directed networks, similar to
#' `InitErgmProposal.CondDegreeDist`, except for indegree case
#' @template ergmProposal-general
NULL
Expand All @@ -327,7 +327,7 @@ InitErgmProposal.CondInDegreeDist <- function(arguments, nw) {
#' @templateVar name CondOutDegreeDist
#' @aliases InitErgmProposal.CondOutDegreeDist
#' @title MHp for odegreedist constraints
#' @description MHp for \eqn{constraints= ~odegreedist}. For directed networks, similar to
#' @description MHp for `constraints= ~odegreedist`. For directed networks, similar to
#' `InitErgmProposal.CondDegreeDist`, except for outdegree case
#' @template ergmProposal-general
NULL
Expand All @@ -348,11 +348,12 @@ InitErgmProposal.CondOutDegreeDist <- function(arguments, nw) {
#' @templateVar name ConstantEdges
#' @aliases InitErgmProposal.ConstantEdges
#' @title MHp for edges constraints
#' @description MHp for \eqn{constraints= ~edges}. Propose pairs of toggles that keep number of edges the same.
#' @description MHp for `constraints= ~edges`. Propose pairs of toggles that keep number of edges the same.
#' This is done by:
#' a. choosing an existing edge at random;
#' b. choosing a dyad at random that does not have an edge; and
#' c. proposing toggling both these dyads.
#'
#' 1. choosing an existing edge at random;
#' 2. choosing a dyad at random that does not have an edge; and
#' 3. proposing toggling both these dyads.
#' @template ergmProposal-general
NULL
InitErgmProposal.ConstantEdges <- function(nw, arguments, ...) {
Expand Down
2 changes: 1 addition & 1 deletion R/InitErgmTerm.R
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ InitErgmTerm.b1degrange<-function(nw, arglist, ..., version=packageVersion("ergm
#' @templateVar name b1cov
#' @title Main effect of a covariate for the first mode in a bipartite network
#' @description This term adds a single network statistic for each quantitative attribute or matrix column to the model equaling the total
#' value of `attr(i)` for all edges /eqn{(i,j)} in the network. This
#' value of `attr(i)` for all edges \eqn{(i,j)} in the network. This
#' term may only be used with bipartite networks. For categorical attributes,
#' see `b1factor` .
#'
Expand Down
1 change: 0 additions & 1 deletion R/ergm-defunct.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
# The last home for functions to removed from ergm.

#' @name ergm-defunct
#' @usage sociality(object, ...)
#' @title Functions that have been removed from this package
#' @description Functions that have been removed after a period of deprecation.
#' @param ... Arguments to defunct functions.
Expand Down
2 changes: 1 addition & 1 deletion R/ergm.R
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@
#' \emph{Journal of Statistical Software}, 24(3).
#' \doi{10.18637/jss.v024.i03}
#'
#' Karwa V, Krivitsky PN, and Slavkovi\'{c} AB (2017). Sharing Social Network
#' Karwa V, Krivitsky PN, and Slavkovi\'c AB (2017). Sharing Social Network
#' Data: Differentially Private Estimation of Exponential-Family Random
#' Graph Models. \emph{Journal of the Royal Statistical Society, Series
#' C}, 66(3):481--500. \doi{10.1111/rssc.12185}
Expand Down
2 changes: 1 addition & 1 deletion R/ergm_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ ergm_model <- function(formula, nw=NULL, silent=FALSE, ..., term.options=list(),
#' term with a specifies name, calls it with the specified arguments,
#' and returns the result.
#'
#' @param A term from an [ergm()] formula: typically a [`name`] or a
#' @param term A term from an [ergm()] formula: typically a [`name`] or a
#' [`call`].
#' @param env Environment in which it is to be evaluated.
#' @param nw A [`network`] object.
Expand Down
1 change: 0 additions & 1 deletion R/ergm_state.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#' used to start another MCMC sampler. It is deliberately loosely
#' specified, and its structure and even name are subject to change.
#'
#' @param nw a [`network`] object.
#' @param nw0 a [`network`] object, whose edges are absent or ignored.
#' @param model an [`ergm_model`] object.
#' @param ext.state a list equal to the number of terms in the model,
Expand Down
2 changes: 1 addition & 1 deletion R/get.node.attr.R
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ NULL
#' frame output. See the Details section for the specification.
#' @param accept A character vector listing permitted data types for
#' the output. See the Details section for the specification.
#' @param l,a arguments to `LARGEST`, which is actually a function
#' @param a arguments to `LARGEST`, which is actually a function
#' that gets processed as a function level spec does.
#' @param ... Additional argument to the functions of network or to
#' the formula's environment.
Expand Down
1 change: 0 additions & 1 deletion R/summary.ergm_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#' @param nw a [`network`] whose statistics are to be evaluated,
#' though an [`ergm_state`] object will also work. If `NULL`,
#' returns empty network's statistics for that model.
#' @template response
#' @template dotdotdot
#'
#' @seealso [summary_formula()]
Expand Down
4 changes: 2 additions & 2 deletions man/CondB1Degree-ergmProposal-7a475c2a.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/CondB2Degree-ergmProposal-5d8af849.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/CondDegree-ergmProposal-7eb103fc.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/CondDegreeDist-ergmProposal-34ad190d.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/CondDegreeMix-ergmProposal-ebac6940.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/CondInDegree-ergmProposal-b2ca9c42.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/CondInDegreeDist-ergmProposal-eaba12ac.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/CondOutDegree-ergmProposal-99f320aa.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/CondOutDegreeDist-ergmProposal-70b19fec.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions man/ConstantEdges-ergmProposal-86c42078.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/b1cov-ergmTerm-a16e8340.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions man/call.ErgmTerm.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions man/ergm-defunct.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/ergm.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions man/ergm_state.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/nodal_attributes-API.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/simulate.ergm.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions man/summary.ergm_model.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/wtedgetree.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ void Wtprintedge(Edge e, WtTreeNode *edges){
Rprintf("\t.parent=%d\n",edges[e].parent);
Rprintf("\t.left=%d\n",edges[e].left);
Rprintf("\t.right=%d\n",edges[e].right);
Rprintf("\t.weight=%d\n",edges[e].weight);
Rprintf("\t.weight=%f\n",edges[e].weight);
}

/*****************
Expand Down

0 comments on commit 8f463ef

Please sign in to comment.