Running examples in ‘netdiffuseR-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: egonet_attrs
> ### Title: Retrieve alter's attributes (network effects)
> ### Aliases: egonet_attrs
> 
> ### ** Examples
> 
> # Simple example with diffnet -----------------------------------------------
> set.seed(1001)
> diffnet <- rdiffnet(150, 20, seed.graph="small-world")
> 
> # Adding attributes
> indeg <- dgr(diffnet, cmode="indegree")
> head(indeg)
  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
1 1 1 2 1 2 1 1 1 1  1  1  1  1  2  1  1  2  1  2  1
2 1 1 1 1 1 1 1 1 1  1  1  1  1  2  1  1  1  1  1  1
3 2 2 2 2 2 1 3 1 2  2  1  2  2  3  3  2  2  3  2  3
4 3 2 4 3 2 3 3 3 3  2  2  3  1  2  3  3  3  2  3  3
5 5 6 4 4 4 5 4 6 4  5  5  5  5  6  7  6  6  4  5  5
6 2 1 2 2 2 2 2 2 2  2  3  3  2  2  2  2  2  2  2  2
> diffnet[["indegree"]] <- indeg
> 
> # Retrieving egonet's attributes (vertices 1 and 20)
> egonet_attrs(diffnet, V=c(1,20))
$`1`
$`1`$`1`
     id value per toa real_threshold indegree
2     2     1   1  15      0.8236725        1
150 150     1   1  12      0.5957844        2

$`1`$`20`
   id value per toa real_threshold indegree
19 19     1   1   7      0.4648842        2
21 21     1   1  13      0.6240292        1


$`2`
$`2`$`1`
     id value per toa real_threshold indegree
2     2     1   2  15      0.8236725        1
150 150     1   2  12      0.5957844        2

$`2`$`20`
   id value per toa real_threshold indegree
19 19     1   2   7      0.4648842        3
21 21     1   2  13      0.6240292        2


$`3`
$`3`$`1`
     id value per toa real_threshold indegree
2     2     1   3  15      0.8236725        1
150 150     1   3  12      0.5957844        2

$`3`$`20`
   id value per toa real_threshold indegree
19 19     1   3   7      0.4648842        3
21 21     1   3  13      0.6240292        1


$`4`
$`4`$`1`
     id value per toa real_threshold indegree
2     2     1   4  15      0.8236725        1
150 150     1   4  12      0.5957844        2

$`4`$`20`
   id value per toa real_threshold indegree
21 21     1   4  13      0.6240292        1
90 90     1   4  17      0.2246004        3


$`5`
$`5`$`1`
     id value per toa real_threshold indegree
2     2     1   5  15      0.8236725        1
150 150     1   5  12      0.5957844        1

$`5`$`20`
   id value per toa real_threshold indegree
19 19     1   5   7      0.4648842        2
21 21     1   5  13      0.6240292        2


$`6`
$`6`$`1`
     id value per toa real_threshold indegree
2     2     1   6  15      0.8236725        1
150 150     1   6  12      0.5957844        2

$`6`$`20`
   id value per toa real_threshold indegree
19 19     1   6   7      0.4648842        2
21 21     1   6  13      0.6240292        1


$`7`
$`7`$`1`
     id value per toa real_threshold indegree
2     2     1   7  15      0.8236725        1
150 150     1   7  12      0.5957844        2

$`7`$`20`
     id value per toa real_threshold indegree
19   19     1   7   7      0.4648842        3
101 101     1   7  15      0.5670383        3


$`8`
$`8`$`1`
     id value per toa real_threshold indegree
2     2     1   8  15      0.8236725        1
150 150     1   8  12      0.5957844        2

$`8`$`20`
   id value per toa real_threshold indegree
19 19     1   8   7      0.4648842        2
21 21     1   8  13      0.6240292        1


$`9`
$`9`$`1`
     id value per toa real_threshold indegree
2     2     1   9  15      0.8236725        1
150 150     1   9  12      0.5957844        2

$`9`$`20`
   id value per toa real_threshold indegree
19 19     1   9   7      0.4648842        2
21 21     1   9  13      0.6240292        1


$`10`
$`10`$`1`
     id value per toa real_threshold indegree
2     2     1  10  15      0.8236725        1
150 150     1  10  12      0.5957844        3

$`10`$`20`
   id value per toa real_threshold indegree
19 19     1  10   7      0.4648842        2
21 21     1  10  13      0.6240292        1


$`11`
$`11`$`1`
     id value per toa real_threshold indegree
2     2     1  11  15      0.8236725        1
111 111     1  11  11      0.8859662        3

$`11`$`20`
   id value per toa real_threshold indegree
19 19     1  11   7      0.4648842        3
21 21     1  11  13      0.6240292        1


$`12`
$`12`$`1`
     id value per toa real_threshold indegree
2     2     1  12  15      0.8236725        1
150 150     1  12  12      0.5957844        3

$`12`$`20`
   id value per toa real_threshold indegree
19 19     1  12   7      0.4648842        1
21 21     1  12  13      0.6240292        1


$`13`
$`13`$`1`
     id value per toa real_threshold indegree
2     2     1  13  15      0.8236725        1
150 150     1  13  12      0.5957844        2

$`13`$`20`
   id value per toa real_threshold indegree
19 19     1  13   7      0.4648842        3
21 21     1  13  13      0.6240292        1


$`14`
$`14`$`1`
     id value per toa real_threshold indegree
2     2     1  14  15      0.8236725        2
150 150     1  14  12      0.5957844        2

$`14`$`20`
   id value per toa real_threshold indegree
19 19     1  14   7      0.4648842        1
21 21     1  14  13      0.6240292        2


$`15`
$`15`$`1`
   id value per toa real_threshold indegree
2   2     1  15  15      0.8236725        1
99 99     1  15   4      0.1587581        3

$`15`$`20`
   id value per toa real_threshold indegree
19 19     1  15   7      0.4648842        3
21 21     1  15  13      0.6240292        1


$`16`
$`16`$`1`
     id value per toa real_threshold indegree
2     2     1  16  15      0.8236725        1
150 150     1  16  12      0.5957844        2

$`16`$`20`
   id value per toa real_threshold indegree
19 19     1  16   7      0.4648842        2
21 21     1  16  13      0.6240292        1


$`17`
$`17`$`1`
   id value per toa real_threshold indegree
2   2     1  17  15      0.8236725        1
89 89     1  17  16      0.7612560        4

$`17`$`20`
   id value per toa real_threshold indegree
19 19     1  17   7      0.4648842        2
21 21     1  17  13      0.6240292        1


$`18`
$`18`$`1`
     id value per toa real_threshold indegree
35   35     1  18  15      0.6328367        3
150 150     1  18  12      0.5957844        2

$`18`$`20`
   id value per toa real_threshold indegree
19 19     1  18   7      0.4648842        2
21 21     1  18  13      0.6240292        1


$`19`
$`19`$`1`
     id value per toa real_threshold indegree
2     2     1  19  15      0.8236725        1
150 150     1  19  12      0.5957844        2

$`19`$`20`
   id value per toa real_threshold indegree
19 19     1  19   7      0.4648842        2
21 21     1  19  13      0.6240292        1


$`20`
$`20`$`1`
     id value per toa real_threshold indegree
2     2     1  20  15      0.8236725        1
150 150     1  20  12      0.5957844        2

$`20`$`20`
   id value per toa real_threshold indegree
18 18     1  20  NA      0.9956532        2
19 19     1  20   7      0.4648842        3


> 
> # Example with a static network ---------------------------------------------
> 
> set.seed(1231)
> n <- 20
> net <- rgraph_ws(n = n, k = 4, p = .5)
> someattr <- matrix(rnorm(n * 2), ncol= 2, dimnames = list(NULL, c("a", "b")))
> 
> # Maximum of -a- in ego network
> ans <- egonet_attrs(net, someattr, fun = function(x) max(x[,"a"]))

 *** caught segfault ***
address 0x55ca00000023, cause 'memory not mapped'

Traceback:
 1: as.data.frame(x[[i]], optional = TRUE)
 2: (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE,     fix.empty.names = TRUE, stringsAsFactors = default.stringsAsFactors()) {    data.row.names <- if (check.rows && is.null(row.names))         function(current, new, i) {            if (is.character(current))                 new <- as.character(new)            if (is.character(new))                 current <- as.character(current)            if (anyDuplicated(new))                 return(current)            if (is.null(current))                 return(new)            if (all(current == new) || all(current == ""))                 return(new)            stop(gettextf("mismatch of row names in arguments of 'data.frame', item %d",                 i), domain = NA)        }    else function(current, new, i) {        if (is.null(current)) {            if (anyDuplicated(new)) {                warning(gettextf("some row.names duplicated: %s --> row.names NOT used",                   paste(which(duplicated(new)), collapse = ",")),                   domain = NA)                current            }            else new        }        else current    }    object <- as.list(substitute(list(...)))[-1L]    mirn <- missing(row.names)    mrn <- is.null(row.names)    x <- list(...)    n <- length(x)    if (n < 1L) {        if (!mrn) {            if (is.object(row.names) || !is.integer(row.names))                 row.names <- as.character(row.names)            if (anyNA(row.names))                 stop("row names contain missing values")            if (anyDuplicated(row.names))                 stop(gettextf("duplicate row.names: %s", paste(unique(row.names[duplicated(row.names)]),                   collapse = ", ")), domain = NA)        }        else row.names <- integer()        return(structure(list(), names = character(), row.names = row.names,             class = "data.frame"))    }    vnames <- names(x)    if (length(vnames) != n)         vnames <- character(n)    no.vn <- !nzchar(vnames)    vlist <- vnames <- as.list(vnames)    nrows <- ncols <- integer(n)    for (i in seq_len(n)) {        xi <- if (is.character(x[[i]]) || is.list(x[[i]]))             as.data.frame(x[[i]], optional = TRUE, stringsAsFactors = stringsAsFactors)        else as.data.frame(x[[i]], optional = TRUE)        nrows[i] <- .row_names_info(xi)        ncols[i] <- length(xi)        namesi <- names(xi)        if (ncols[i] > 1L) {            if (length(namesi) == 0L)                 namesi <- seq_len(ncols[i])            vnames[[i]] <- if (no.vn[i])                 namesi            else paste(vnames[[i]], namesi, sep = ".")        }        else if (length(namesi)) {            vnames[[i]] <- namesi        }        else if (fix.empty.names && no.vn[[i]]) {            tmpname <- deparse(object[[i]], nlines = 1L)[1L]            if (substr(tmpname, 1L, 2L) == "I(") {                ntmpn <- nchar(tmpname, "c")                if (substr(tmpname, ntmpn, ntmpn) == ")")                   tmpname <- substr(tmpname, 3L, ntmpn - 1L)            }            vnames[[i]] <- tmpname        }        if (mirn && nrows[i] > 0L) {            rowsi <- attr(xi, "row.names")            if (any(nzchar(rowsi)))                 row.names <- data.row.names(row.names, rowsi,                   i)        }        nrows[i] <- abs(nrows[i])        vlist[[i]] <- xi    }    nr <- max(nrows)    for (i in seq_len(n)[nrows < nr]) {        xi <- vlist[[i]]        if (nrows[i] > 0L && (nr%%nrows[i] == 0L)) {            xi <- unclass(xi)            fixed <- TRUE            for (j in seq_along(xi)) {                xi1 <- xi[[j]]                if (is.vector(xi1) || is.factor(xi1))                   xi[[j]] <- rep(xi1, length.out = nr)                else if (is.character(xi1) && inherits(xi1, "AsIs"))                   xi[[j]] <- structure(rep(xi1, length.out = nr),                     class = class(xi1))                else if (inherits(xi1, "Date") || inherits(xi1,                   "POSIXct"))                   xi[[j]] <- rep(xi1, length.out = nr)                else {                  fixed <- FALSE                  break                }            }            if (fixed) {                vlist[[i]] <- xi                next            }        }        stop(gettextf("arguments imply differing number of rows: %s",             paste(unique(nrows), collapse = ", ")), domain = NA)    }    value <- unlist(vlist, recursive = FALSE, use.names = FALSE)    vnames <- unlist(vnames[ncols > 0L])    if (fix.empty.names && any(noname <- !nzchar(vnames)))         vnames[noname] <- paste0("Var.", seq_along(vnames))[noname]    if (check.names) {        if (fix.empty.names)             vnames <- make.names(vnames, unique = TRUE)        else {            nz <- nzchar(vnames)            vnames[nz] <- make.names(vnames[nz], unique = TRUE)        }    }    names(value) <- vnames    if (!mrn) {        if (length(row.names) == 1L && nr != 1L) {            if (is.character(row.names))                 row.names <- match(row.names, vnames, 0L)            if (length(row.names) != 1L || row.names < 1L ||                 row.names > length(vnames))                 stop("'row.names' should specify one of the variables")            i <- row.names            row.names <- value[[i]]            value <- value[-i]        }        else if (!is.null(row.names) && length(row.names) !=             nr)             stop("row names supplied are of the wrong length")    }    else if (!is.null(row.names) && length(row.names) != nr) {        warning("row names were found from a short variable and have been discarded")        row.names <- NULL    }    if (is.null(row.names))         row.names <- .set_row_names(nr)    else {        if (is.object(row.names) || !is.integer(row.names))             row.names <- as.character(row.names)        if (anyNA(row.names))             stop("row names contain missing values")        if (anyDuplicated(row.names))             stop(gettextf("duplicate row.names: %s", paste(unique(row.names[duplicated(row.names)]),                 collapse = ", ")), domain = NA)    }    attr(value, "row.names") <- row.names    attr(value, "class") <- "data.frame"    value})(id = c(7, 11, 14, 20), value = c(1, 1, 1, 1), check.names = TRUE,     fix.empty.names = TRUE, stringsAsFactors = TRUE)
 3: do.call(data.frame, c(x, alis))
 4: as.data.frame.list(list(id = c(7, 11, 14, 20), value = c(1, 1, 1, 1)))
 5: as.data.frame(list(id = c(7, 11, 14, 20), value = c(1, 1, 1, 1)))
 6: evalq(as.data.frame(list(id = c(7, 11, 14, 20), value = c(1, 1, 1, 1))), <environment>)
 7: evalq(as.data.frame(list(id = c(7, 11, 14, 20), value = c(1, 1, 1, 1))), <environment>)
 8: doTryCatch(return(expr), name, parentenv, handler)
 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
10: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
11: doTryCatch(return(expr), name, parentenv, handler)
12: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
13: tryCatchList(expr, classes, parentenv, handlers)
14: tryCatch(evalq(as.data.frame(list(id = c(7, 11, 14, 20), value = c(1, 1, 1, 1))), <environment>), error = function (x) x, interrupt = function (x) x)
15: .Call("_netdiffuseR_egonet_attrs_cpp", PACKAGE = "netdiffuseR",     graph, V, outer, self, valued)
16: egonet_attrs_cpp(graph, V - 1L, outer, self, valued)
17: egonet_attrs.matrix(graph, attrs, V, outer, fun, as.df, self,     valued)
18: egonet_attrs(net, someattr, fun = function(x) max(x[, "a"]))
An irrecoverable exception occurred. R is aborting now ...
Segmentation fault