Unlimited learning, half price | 50% off
Get 50% off unlimited learning

netjack (version 1.0.0)

net_stat_apply: Apply a network statistic function to a NetSet or NetSampleSet object.

Description

This function applies a network statistic function to a NetSet or NetSampleSet object, and returns the calculated network statistics.

Usage

net_stat_apply(netSet, net.stat.fun, net.stat.fun.args, net.stat.name)

# S4 method for NetSet net_stat_apply(netSet, net.stat.fun, net.stat.fun.args, net.stat.name)

# S4 method for NetSampleSet net_stat_apply(netSet, net.stat.fun, net.stat.fun.args, net.stat.name)

Arguments

netSet

A NetSet or NetSampleSet object.

net.stat.fun

The network statistic function

net.stat.fun.args

A list of additional arguments to the network statistic function

net.stat.name

A descriptive name for the network statistic (defaults to deparsed name of statistic function)

Value

A NetStatSet or NetSampleStatSet

Methods (by class)

  • NetSet: net_stat_apply for NetSet

  • NetSampleSet: Converter for NetSampleSet

Examples

Run this code
# NOT RUN {
data(GroupA)
GroupA_Net = as_NetSample(GroupA, 1:20, node.variables = list(community = c(rep(1, 10), rep(2,10))),
 sample.variables = list(group = c(rep(1, 10), rep(2,10))))
Jackknife_GroupA_Net = net_apply(GroupA_Net, node_jackknife)
GlobEff_GroupA_Net = net_stat_apply(Jackknife_GroupA_Net, global_efficiency)
# }

Run the code above in your browser using DataLab