SubgrPlots (version 0.1.3)

plot_overlap2: a graphical display for showing relative proportions of pairwise subgroup overlap in a matrix layout

Description

this function produces a plot for displaying relative proportions of pairwise subgroup overlap, where the relative proportion is defined by |intersect(A, B)|/|A|, for any sets A and B and A is the baseline set. The letters represent subgroups defined by the categories of the selected covariates. Subgroup are located around a circle have a directional arrowed curved line to the other subgroups. The arrowed lines have different colours, reflecting the level of overlap proportions. Note that if a subgroup is a baseline subgroup, then arrows on the curves would be located close to the corresponding letter. Also, the conditions of arrowed curves can be changed by setting different values on the argument "para". Contrary to plot_overlap, this function produces a matrix layout.

Usage

plot_overlap2(
  dat,
  covari.sel,
  para = c(0.2, 0.2, 1),
  font.size = c(1.5, 1.5, 0.8),
  title = NULL
)

Arguments

dat

a data set

covari.sel

a vector of indices of covariates

para

a vector with three elements specifying the parameters of plot display; the first element is for adjusting the curvature of curves; the second is for placing the relative position of arrowheads on the lines; the third is for specifying the adjustment of the arrowhead (there are three possible values, 0, 0.5 and 1)

font.size

a vector specifying the size of labels and text; the first element is for the title; the second is for the covariates labels.

title

a string specifying the main title.

Examples

Run this code
# NOT RUN {
# Load the data to be used
data(prca)
dat <- prca

plot_overlap2(dat = dat,
              covari.sel = c(6,5,4,7),
              para = c(0.05, 0.75, 1),
              font.size = c(1.2, 1.2, 0.8),
              title = NULL)

# }

Run the code above in your browser using DataLab