Learn R Programming

netjack (version 1.2.0)

group_perc_diff_test_ggPlot: Group Percentage Difference Plots

Description

This function performs the group percentage difference test and generates a ggplot object representing the results.

Usage

group_perc_diff_test_ggPlot(netSampleStatSet, grouping.variable, labels,
  sort = "alpha", p.threshold = 0.05, p.adjust = "BH",
  hide.non.sig = F, non.parametric = F)

Arguments

netSampleStatSet

Input NetSampleStatSet

grouping.variable

character name of sample level grouping variable

labels

ggplot2 labs object. Labels for the plot

sort

one of "alpha", "mag"; "alpha" sorts in alpha numeric order, while "mag" sorts in order of decreasing effect size

p.threshold

Numeric. Threshold by which to highlight results. Defaults to .05

p.adjust

character string for requested multiple comparisons adjustment. Defaults to Benjamani-Hochberg

hide.non.sig

Logical. If true, non significant (as defined by p.threshold) are not plotted.

non.parametric

Logical. if true, test is performed using Wilcox test. If false, t-test. Defaults to false.

Value

A ggplot object

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)
group_perc_diff_test_ggPlot(GlobEff_GroupA_Net, "group")
# }

Run the code above in your browser using DataLab