Skip to Main Content
George Mason University | University Libraries
See Updates and FAQs for the latest library services updates. Subject Librarians are available for online appointments, and Virtual Reference has extended hours.

Learn R

Resources to learn and use the Open Source Statistical software R (R-Project)

GGPlot2

  • ggplot2 is universally considered the best package for general graphing and is part of the tidyverse (see Data Management).
  • The function name is ggplot() - without the 2.
  • There is some graphing in base r that can be quick and easy for exploration, but few people use lattice any more.

Useful ggplot-based packages:

  • GGally - Good for bivariate graphing with functions like ggpairs()
  • ggformula - uses formula notation and ggplot for ease of teaching
  • SmartEDA - functions for all types of exploratory data analysis
  • DataExplorer - easy functions for data cleaning and exploration
  • ggpubr - ‘ggplot2’ Based Publication Ready Plots

Point-and-Click Options

  • esquiesse - Best to create a single graph from cleaned/prepared data and/or to learn ggplot syntax.
    • Tableau-like workflow helps build and refine a single graph using drag and drop. Automatically chooses chart types based on data types.
    • Produces nice, clean code.
    • Allows for specifying variable types on import (e.g., create factors), transforming values (e.g., log), and filtering by value.
  • ggquickeda - Best if you have categorical variables and would like to modify them before creating visuals.
    • Only imports csv files within the interface, or can specify dataset when starting.
    • Includes many tools to modify categorical data, like creating factors and merging groups.
    • Many options to create plots, though the interface is cluttered and not always intuitive. Can also create Descriptive Statistics tables.
  • ExPanDar - Best for exploratory use.
    • Originally for time series, but datasets with any unique numeric variable will work. Also works with SPSS files.
    • Automatically produces a variety of EDA charts and tables (e.g., regression) which look nice, but the appearance is not customizable.
    • You can easily change variables, filter cases, and group by factor levels.
    • Can remove some outliers and create new variables through formulas.
    • Can save and restore settings, and can right click to save images (they will be png). No code is produced.

Interactive Graphics

ggplot2

ggplot2 Tutorials

Graph Galleries

Graph Galleries with Example Code

Networks in R and Python

Packages in R 

Networkx. Networkx is a Python package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks.