@@ -218,7 +218,8 @@ uncombine_network <- function(nw, populate = TRUE) {
218218# ' This is used primarily by developers to provide informative error
219219# ' messages.
220220# '
221- # ' @param combiner the combiner name (typically `nw %n% ".combiner"`)
221+ # ' @param combiner the combiner name (typically the first element of
222+ # ' `nw %n% ".combiner"`)
222223# '
223224# ' @param description a named character vector or list with elements
224225# ' `constructor`, `element`, `elements`, `construct`, `id`, and
@@ -356,11 +357,11 @@ as.networkLite.combined_networks <- function(x, ...){
356357# ' @keywords internal
357358# ' @export
358359assert_combined_network <- function (nw , combiners , term = TRUE , call = rlang :: caller_env()) {
359- if (! (nw %n % " .combiner" %|| % " " ) % in% combiners ) {
360+ if (! any (nw %n %" .combiner" %in% combiners ) ) {
360361 info <- map(combiners , ergm.multi_combiner )
361362 valid <- paste.and(paste0(map_chr(info , " construct" ), " constructed by " , sQuote(map_chr(info , " constructor" ))),
362363 con = " nor" )
363- msg <- paste0(" This network is not a " , valid , " at its top level." )
364+ msg <- paste0(" This network is not a " , valid , " (nor compatible) at its top level." )
364365 if (term ) ergm_Init_stop(msg )
365366 else abort(msg , call = call )
366367 FALSE
0 commit comments