Learn R Programming

remstats (version 3.2.4)

bind_remstats: Combine two or more remstats objects

Description

Function to bind any number of remstats objects into one while duplicated statistics in the combined object are removed based on their name.

Usage

bind_remstats(...)

Value

statistics array with the combined statistics, where rows refer to time points, columns refer to potential relational event (i.e., potential edges) in the risk set and slices refer to statistics

Arguments

...

Any number of remstats objects. All the remstats objects must have matching dimensions, except for the third dimension. Note that duplicated statistics in the combined object are removed based on their name.

Examples

Run this code
library(remstats)

# Load the data
data(history)
data(info)

# Prepare the data
reh <- remify::remify(edgelist = history, model = "actor")

# Obtain two different statistics objects
effects1 <- ~ inertia():receive("extraversion") + otp()
stats1 <- remstats(receiver_effects = effects1, reh = reh, attr_actors = info)
effects2 <- ~ reciprocity()
stats2 <- remstats(receiver_effects = effects2, reh = reh, attr_actors = info)

# Bind the two statistics objects
statsC <- bind_remstats(stats1, stats2)

Run the code above in your browser using DataLab