comp_ply()
applies a function, that uses an alter attribute to calculate
a compositional measurement, on all networks in an egor
object and returns a
numeric vector
.
comp_ply(object, alt.attr, .f, ..., ego.attr = NULL, result.name = "result")
object | An |
---|---|
alt.attr | A |
.f | A |
... | Optional arguments to |
ego.attr | Optional |
result.name | Optional |
A tibble
with the ego ID and a numeric
result vector.
When an ego attribute is used the .f
is called like this:
.f(alt.attr, ego.attr, ...)
. .f
must return a single numeric value.
Michał Bojanowski, m.bojanowski@uw.edu.pl
Till Krenz, public@tillt.net
#> # A tibble: 10 x 2 #> .egoID result #> <dbl> <dbl> #> 1 1 28.9 #> 2 2 28.1 #> 3 3 27.0 #> 4 4 26.8 #> 5 5 23.5 #> 6 6 28.2 #> 7 7 26.9 #> 8 8 28.6 #> 9 9 28.7 #> 10 10 28.1