pairsData: Generate data for pairwise scatterplot matrix.

Description Usage Arguments Value

View source: R/data.R

Description

Convert a wide dataset into a format that can be fed to ggplot to create a scatterplot matrix.

Usage

1
pairsData(data, xy_vars, z_vars = NULL, mirror = F)

Arguments

data

Data frame, in "wide" format (i.e. must contain a column for each xy_vars and z_vars).

xy_vars

Character vector indicating variables to be paired (these would be the x and y dimensions if the result is used for a scatterplot matrix).

z_vars

Optional character vector indicating additional variables to retain for each record.

mirror

Logical indicating whether to generate data for both upper and lower trianges of the matrix (default is FALSE).

Value

A restructured data frame.


matthewkling/ecoclim documentation built on May 21, 2019, 1:04 p.m.