Skip to content
Back to skills

Ggstatsplot

ASecurity

R ggstatsplot package for statistical plots. Use for publication-ready plots with statistical details.

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added June 5, 2026
datago

Security analysis

A100/100

Scanned June 5, 2026

npx -y skills add LeoLin990405/r-analytics-skill --skill ggstatsplot --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ggstatsplot?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ggstatsplot
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/leolin990405-ggstatsplot/badge)](https://www.skillsdirectory.com/skills/leolin990405-ggstatsplot)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ggstatsplot
description: R ggstatsplot package for statistical plots. Use for publication-ready plots with statistical details.
---

# ggstatsplot

ggplot2-based plots with statistical details.

## Scatter Plot with Statistics

```r
library(ggstatsplot)

# Scatter with correlation
ggscatterstats(
  data = mtcars,
  x = wt,
  y = mpg
)

# With grouping
grouped_ggscatterstats(
  data = mtcars,
  x = wt,
  y = mpg,
  grouping.var = cyl
)
```

## Box/Violin Plots

```r
# Between-subjects comparison
ggbetweenstats(
  data = iris,
  x = Species,
  y = Sepal.Length
)

# Violin plot
ggbetweenstats(
  data = iris,
  x = Species,
  y = Sepal.Length,
  type = "nonparametric",
  plot.type = "violin"
)

# Paired/within-subjects
ggwithinstats(
  data = df,
  x = condition,
  y = score,
  subject.id = subject
)
```

## Bar Plots

```r
# Proportion test
ggbarstats(
  data = mtcars,
  x = am,
  y = cyl
)

# Pie chart
ggpiestats(
  data = mtcars,
  x = cyl
)
```

## Histogram

```r
# With distribution fit
gghistostats(
  data = mtcars,
  x = mpg,
  binwidth = 2
)

# Density plot
gghistostats(
  data = mtcars,
  x = mpg,
  type = "nonparametric"
)
```

## Dot Plot

```r
# Dot plot with statistics
ggdotplotstats(
  data = df,
  x = value,
  y = category
)
```

## Correlation Matrix

```r
# Correlation plot
ggcorrmat(
  data = mtcars,
  cor.vars = c(mpg, disp, hp, wt)
)

# With specific method
ggcorrmat(
  data = mtcars,
  type = "nonparametric",  # Spearman
  cor.vars = c(mpg, disp, hp, wt)
)
```

## Covariance Plot

```r
# Covariance matrix
ggcorrmat(
  data = mtcars,
  cor.vars = c(mpg, disp, hp),
  matrix.type = "upper",
  type = "parametric"
)
```

## Statistical Test Types

```r
# Parametric (default)
ggbetweenstats(data = df, x = group, y = value, type = "parametric")

# Non-parametric
ggbetweenstats(data = df, x = group, y = value, type = "nonparametric")

# Robust
ggbetweenstats(data = df, x = group, y = value, type = "robust")

# Bayesian
ggbetweenstats(data = df, x = group, y = value, type = "bayes")
```

## Customization

```r
# Custom colors
ggbetweenstats(
  data = iris,
  x = Species,
  y = Sepal.Length,
  palette = "Set2"
)

# Custom labels
ggbetweenstats(
  data = iris,
  x = Species,
  y = Sepal.Length,
  xlab = "Iris Species",
  ylab = "Sepal Length (cm)",
  title = "Comparison of Sepal Length"
)

# Pairwise comparisons
ggbetweenstats(
  data = iris,
  x = Species,
  y = Sepal.Length,
  pairwise.comparisons = TRUE,
  pairwise.display = "significant"
)
```

## Effect Sizes

```r
# Show effect size
ggbetweenstats(
  data = iris,
  x = Species,
  y = Sepal.Length,
  effsize.type = "eta"  # eta, omega, epsilon
)
```

## Grouped Plots

```r
# Grouped scatter
grouped_ggscatterstats(
  data = mtcars,
  x = wt,
  y = mpg,
  grouping.var = cyl,
  plotgrid.args = list(ncol = 2)
)

# Grouped box plots
grouped_ggbetweenstats(
  data = mtcars,
  x = am,
  y = mpg,
  grouping.var = cyl
)
```

## Extract Statistics

```r
# Get statistical results
result <- ggbetweenstats(data = iris, x = Species, y = Sepal.Length)

# Extract stats
extract_stats(result)
extract_subtitle(result)
```

## Combine Plots

```r
# Using patchwork
library(patchwork)

p1 <- ggbetweenstats(data = iris, x = Species, y = Sepal.Length)
p2 <- ggbetweenstats(data = iris, x = Species, y = Sepal.Width)

p1 + p2
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.