Learn R Programming

netjack (version 1.0.0)

to_data_frame: Network statistics to long format dataframe

Description

This function converts a NetStatSet or NetSampleStatSet into a long format dataframe

Usage

to_data_frame(netStatSet)

# S4 method for NetStatSet to_data_frame(netStatSet)

# S4 method for NetSampleStatSet to_data_frame(netStatSet)

Arguments

netStatSet

A NetStatSet or NetSampleStatSet object

Value

A long format dataframe containing the name of the original network, the original network network statistic, the name of the manipulated network, the manipulated network network statistic and the name of the network statistic.

Methods (by class)

  • NetStatSet: Converter for NetSampleStatSet

  • NetSampleStatSet: Converter for NetSampleStatSet

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)
head(to_data_frame(GlobEff_GroupA_Net))
# }

Run the code above in your browser using DataLab