| Title: | Create Scatter Plots with Marginal Density or Box Plots |
|---|---|
| Description: | Allows you to make clean, good-looking scatter plots with the option to easily add marginal density or box plots on the axes. It is also available as a module for 'jamovi' (see <https://www.jamovi.org> for more information). 'Scatr' is based on the 'cowplot' package by Claus O. Wilke and the 'ggplot2' package by Hadley Wickham. |
| Authors: | Ravi Selker |
| Maintainer: | Ravi Selker <[email protected]> |
| License: | GPL (>= 2) |
| Version: | 1.3.0 |
| Built: | 2026-05-23 06:04:18 UTC |
| Source: | https://github.com/raviselker/scatr |
Function for making pareto charts.
pareto(data, x, counts = NULL, angle = 0)pareto(data, x, counts = NULL, angle = 0)
data |
the data as a data frame |
x |
a string naming the variable from |
counts |
a string naming the variable from |
angle |
a number from 0 to 45 defining the angle of the x-axis labels, where 0 degrees represents completely horizontal labels. |
A results object containing:
results$pareto |
a Pareto chart |
set.seed(1337) X <- sample(c('A','B','C','D','E','F'), 100, replace=TRUE) dat <- data.frame(X = X) scatr::pareto(dat, x = 'X')set.seed(1337) X <- sample(c('A','B','C','D','E','F'), 100, replace=TRUE) dat <- data.frame(X = X) scatr::pareto(dat, x = 'X')
Function for making clean, good looking scatter plots with the option to add marginal denisty or box plots.
scat(data, x, y, group = NULL, marg = "none", line = "none", se = FALSE)scat(data, x, y, group = NULL, marg = "none", line = "none", se = FALSE)
data |
the data as a data frame |
x |
a string naming the variable from |
y |
a string naming the variable from |
group |
a string naming the variable from |
marg |
|
line |
|
se |
|
A results object containing:
results$scat |
a scatter plot |
set.seed(1337) X <- rnorm(100) Y <- 0.5*X + rnorm(100) dat <- data.frame(X = X, Y = Y) scatr::scat(dat, x = 'X', y = 'Y', line = 'linear', se = TRUE, marg = 'dens')set.seed(1337) X <- rnorm(100) Y <- 0.5*X + rnorm(100) dat <- data.frame(X = X, Y = Y) scatr::scat(dat, x = 'X', y = 'Y', line = 'linear', se = TRUE, marg = 'dens')