Skip to content

Commit

Permalink
as.cntrol.list.list() and hence snctrl() no longer clobbers nested co…
Browse files Browse the repository at this point in the history
…ntrols, e.g., control.ergm(SAN=control.san(...),...).

fixes #26
  • Loading branch information
krivit committed Jun 27, 2023
1 parent 2031289 commit f493236
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: statnet.common
Version: 4.9.0-423
Date: 2023-05-15
Version: 4.9.0-436
Date: 2023-06-27
Title: Common R Scripts and Utilities Used by the Statnet Project Software
Authors@R: c(
person(c("Pavel", "N."), "Krivitsky", role=c("aut","cre"), email="[email protected]", comment=c(ORCID="0000-0002-9101-3362", affiliation="University of New South Wales")),
Expand Down
3 changes: 2 additions & 1 deletion R/control.utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,8 @@ as.control.list.list <- function(x, FUN=NULL, unflat=TRUE, ...){
l[aname] <- list(x[[aname]])
xnames_unused <<- setdiff(xnames_unused, aname)
}else if(is.call(aval <- args[[aname]]) && startsWith(as.character(aval[[1]]), "control.")){ # A control list not supplied directly: process recursively.
l[aname] <- list(unflat(get(as.character(aval[[1]]), pos=environment(f), mode="function")))
subargs <- unflat(get(as.character(aval[[1]]), pos=environment(f), mode="function"))
if(length(subargs)) l[aname] <- list(subargs)
}
# Otherwise, leave blank.

Expand Down

0 comments on commit f493236

Please sign in to comment.