Group Rank Dotplot

Authors

[Editor] Hu Zheng;

[Contributors]

Note

Hiplot website

This page is the tutorial for source code version of the Hiplot Group Rank Dotplot plugin. You can also use the Hiplot website to achieve no code ploting. For more information please see the following link:

https://hiplot.cn/basic/grdotplot?lang=en

Values distribution for different groups.

Setup

  • System Requirements: Cross-platform (Linux/MacOS/Windows)

  • Programming language: R

  • Dependent packages: sigminer; ggplot2

# Install packages
if (!requireNamespace("sigminer", quietly = TRUE)) {
  install_github("ShixiangWang/sigminer")
}
if (!requireNamespace("ggplot2", quietly = TRUE)) {
  install.packages("ggplot2")
}

# Load packages
library(sigminer)
library(ggplot2)

Data Preparation

# Load data
data <- read.delim("files/Hiplot/080-grdotplot-data.txt", header = T)

# View data
head(data)
  gvar       dvar
1    A  0.4871212
2    A -0.1370275
3    A  0.1717455
4    A -0.9447939
5    A -1.2876203
6    A  1.4077657

Visualization

# Group Rank Dotplot
p <- show_group_distribution(data, gvar = "gvar",  dvar = "dvar", 
                             order_by_fun = F)

p
FigureΒ 1: Group Rank Dotplot