vis_comp_net_checks: Analyze and visualize network measure changes, checking for...

Usage Arguments Examples

Usage

1
vis_comp_net_checks(df, perc_sample_options = NULL, metric_options = NULL)

Arguments

df
perc_sample_options
metric_options

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (df, perc_sample_options = NULL, metric_options = NULL)
{
    spec_df = df
    if (!is.null(perc_sample_options)) {
        spec_df_median <- spec_df %>% dplyr::group_by(type, rank_level,
            measure, percent_samples_included) %>% dplyr::summarise(Median = median(data)) %>%
            as.data.frame()
        g1 <- ggplot(spec_df_median, aes(rank_level, Median,
            color = type)) + geom_point(aes(shape = percent_samples_included)) +
            facet_wrap(~ measure, scales = "free") +
            theme(axis.title.x = element_blank(), axis.text.x = element_blank())
    }
    else if (!is.null(metric_options)) {
        spec_df_median <- spec_df %>% dplyr::group_by(type, rank_level,
            measure, metric) %>% dplyr::summarise(Median = median(data)) %>%
            as.data.frame()
        g1 <- ggplot(spec_df_median, aes(rank_level, Median,
            color = type)) + geom_point(aes(shape = metric)) +
            facet_wrap(~measure, scales = "free") + theme(axis.title.x = element_blank(),
            axis.text.x = element_text(angle = 45, hjust = 1,
                size = 7))
    }
    return(g1)
  }

ConesaLab/MDM documentation built on Aug. 1, 2020, 11:47 a.m.