| Title: | Making Visual Exploratory Data Analysis with Nested Data Easier |
|---|---|
| Description: | Provides tools for visual exploratory data analysis with nested data. Includes functions for creating bivariate plots, dot plots, histograms, and violin plots for each group or unit in nested data. Methods are described in Crabtree and Nelson (2017) "Plotrr: Functions for making visual exploratory data analysis with nested data easier" <doi:10.21105/joss.00190>. |
| Authors: | Charles Crabtree [aut, cre], Michael J. Nelson [aut] |
| Maintainer: | Charles Crabtree <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 1.0.2 |
| Built: | 2026-05-27 08:00:45 UTC |
| Source: | https://github.com/lobsterbush/plotrr |
Returns a plot of the bivariate relationship between two measures for each group/unit.
bivarplots(x, y, group, data)bivarplots(x, y, group, data)
x |
A vector. |
y |
A vector. |
group |
A vector. |
data |
A data frame. |
A series of figures that plot the bivariate relationship between two measures for each group/unit.
Charles Crabtree [email protected]
a <- runif(1000, min = 0, max = 1) b <- a + rnorm(1000, mean = 0, sd = 1) c <- rep(c(1:10), times = 100) data <- data.frame(a, b, c) bivarplots("a", "b", "c", data)a <- runif(1000, min = 0, max = 1) b <- a + rnorm(1000, mean = 0, sd = 1) c <- rep(c(1:10), times = 100) data <- data.frame(a, b, c) bivarplots("a", "b", "c", data)
Returns a plot of the bivariate relationship between two measures with a rugplot for each measure.
bivarrugplot(x, y, data)bivarrugplot(x, y, data)
x |
A vector. |
y |
A vector. |
data |
A data frame. |
A plot of the bivariate relationship between two measures with a rugplot for each measure.
Charles Crabtree [email protected]
a <- runif(1000, min = 0, max = 1) b <- a + rnorm(1000, mean = 0, sd = 1) data <- data.frame(a, b) bivarrugplot("a", "b", data)a <- runif(1000, min = 0, max = 1) b <- a + rnorm(1000, mean = 0, sd = 1) data <- data.frame(a, b) bivarrugplot("a", "b", data)
Effectively clears the R terminal by filling it with whitespace.
clear(...)clear(...)
... |
An unused argument. |
No return value (called for side effect of printing a form feed
character to the console, which visually clears the R terminal). Returns
NULL invisibly.
Charles Crabtree [email protected]
clear()clear()
Returns histograms for a measure for each group/unit.
dotplots(x, y, group, data, n)dotplots(x, y, group, data, n)
x |
A vector. |
y |
A vector. |
group |
A vector that contains unit/group identifiers. |
data |
A data frame. |
n |
The number of bins. Some experimentation with this number might be necessary. |
Historgrams for a measure for each group/unit.
Charles Crabtree [email protected]
a <- runif(1000, min = 0, max = 1) b <- a + rnorm(1000, mean = 0, sd = 1) c <- rep(c(1:10), times = 100) data <- data.frame(a, b, c) dotplots("a", "b", "c", data, 20)a <- runif(1000, min = 0, max = 1) b <- a + rnorm(1000, mean = 0, sd = 1) c <- rep(c(1:10), times = 100) data <- data.frame(a, b, c) dotplots("a", "b", "c", data, 20)
Returns histograms for a measure for each group/unit.
histplots(x, y, group, data, n)histplots(x, y, group, data, n)
x |
A vector. |
y |
A vector. |
group |
A vector that contains unit/group identifiers. |
data |
A data frame. |
n |
The number of bins. |
Historgrams for a measure for each group/unit.
Charles Crabtree [email protected]
a <- runif(1000, min = 0, max = 1) b <- a + rnorm(1000, mean = 0, sd = 1) c <- rep(c(1:10), times = 100) data <- data.frame(a, b, c) histplots("a", "b", "c", data, 5)a <- runif(1000, min = 0, max = 1) b <- a + rnorm(1000, mean = 0, sd = 1) c <- rep(c(1:10), times = 100) data <- data.frame(a, b, c) histplots("a", "b", "c", data, 5)
Calculates the number of unique values in a vector.
lengthunique(x)lengthunique(x)
x |
A vector. |
The number of unique values in a vector.
Charles Crabtree [email protected]
x <- rep(c(1:10), 10) lengthunique(x)x <- rep(c(1:10), 10) lengthunique(x)
Converts factor vectors to numeric vectors.
makefacnum(x)makefacnum(x)
x |
A vector. |
A numeric vector.
Charles Crabtree [email protected]
x <- c("1", "2", "3") x <- as.factor(x) x x <- makefacnum(x) x is.numeric(x)x <- c("1", "2", "3") x <- as.factor(x) x x <- makefacnum(x) x is.numeric(x)
Returns violin plots for the relationship between two measures for each group/unit.
violinplots(x, y, group, data)violinplots(x, y, group, data)
x |
A vector. |
y |
A vector. |
group |
A vector that contains unit/group identifiers. |
data |
A data frame. |
Violin plots for the relationship between two measures for each group/unit.
Charles Crabtree [email protected]
a <- runif(1000, min = 0, max = 1) b <- a + rnorm(1000, mean = 0, sd = 1) c <- rep(c(1:10), times = 100) data <- data.frame(a, b, c) violinplots("a", "b", "c", data)a <- runif(1000, min = 0, max = 1) b <- a + rnorm(1000, mean = 0, sd = 1) c <- rep(c(1:10), times = 100) data <- data.frame(a, b, c) violinplots("a", "b", "c", data)