plotrr v1.0.0


Monthly downloads



Making Visual Exploratory Data Analysis with Nested Data Easier

Functions for making visual exploratory data analysis with nested data easier.


Build Status Build status DOI status

plotrr: Functions for Making Visual Exploratory Data Analysis with Nested Data Easier.

Social scientists can improve their research by conducting exploratory data analysis (EDA) (Tukey 1977). The benefits of EDA include: ''maximiz[ing] insight into a data set; uncover[ing] underlying structure; extract[ing] important variables; detect[ing] outliers and anomalies; test[ing] underlying assumptions; develop[ing] parsimonious models; and determin[ing] optimal factor settings'' (NIST/SEMATECH 2012). Despite these benefits, scholars infrequently conduct EDA. One possible explanation for this is because it takes additional time to do so; it is often easier to move straight to confirmatory analysis.

The time concern is particularly an issue for researchers who use nested data. The issue here is that most existing EDA software routines visualize relationships based on the pooled data. Few existing functions help scholars easily visualize relationships within groups/units.

plotrr helps address this issue by providing several functions that make visual EDA easier to conduct. The focus of many of the package's functions is to create plots that can help researchers explore relationships within nested data. Among other things, these functions can help scholars assess the extent to which expected relationships between variables occur in specific cases. bivarplots creates a bivariate plot for every group/unit in the data, dotplots creates a dot plot for every group/unit, and violinplots creates a violin plot for every group/unit.

As demonstrated in Crabtree and Nelson (2017), creating and interpreting plots like this this can help scholars find initial support for their theoretical expectations prior to conducting analysis with pooled data. The intuition here is that researchers can check their initial priors about relationships within cases. When the data support those priors, scholars have some additional evidence that the processes they theorize actually occur in the real world.

In addition to these functions, the package also includes histplots, which creates histograms of a measure for each group/unit, and bivarrugplot, which returns a plot of the bivariate relationship between two measures alongside a rugplot of each measure.

Finally, the package also contains several "helper," or convenience, functions. clear effectively clears the R terminal. lengthunique calculates the number of uniques values in a vector. makefacnum converts factor vectors numeric vectors.

Package Installation

The latest development version (1.0.0) is on GitHub can be installed using devtools.


Support or Contact

Please use the issue tracker for problems, questions, or feature requests. If you would rather email with questions or comments, you can contact Charles Crabtree and he will address the issue.

If you would like to contribute to the package, that is great! We welcome pull requests and new developers.


To test the software, users and potential contributors can use the example code provided in the documentation for each function.


Thanks to Karl Broman and Hadley Wickham for providing excellent free guies to building R packages.


  • Trochim, William M. K., and James P. Donnelly. 2008. Research Methods Knowledge Base. New York, NY: Cengage Learning.

Functions in plotrr

Name Description
bivarplots Plots the bivariate relationship between two measures for each group/unit
lengthunique Calculates the number of unique values in a vector
bivarrugplot Plots the bivariate relationship between two measures and a rugplot for each measure
makefacnum Converts factor vectors to numeric vectors
clear (Effectively) clears R terminal
violinplots Creates violin plots for the relationship between two measures for each group/unit
dotplots Creates histograms for a measure for each group/unit
histplots Creates histograms for a measure for each group/unit
No Results!

Vignettes of plotrr

No Results!

Last month downloads


Type Package
License MIT + file LICENSE
Encoding UTF-8
LazyData true
RoxygenNote 6.0.1
VignetteBuilder knitr
NeedsCompilation no
Packaged 2017-12-04 23:09:36 UTC; cdcrabtree
Repository CRAN
Date/Publication 2017-12-05 00:04:46 UTC

Include our badge in your README