Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

uppertriangle

Rearrange dataset as the preparation of ggscatmat function


Description

Function for making the dataset used to plot the uppertriangle plots.

Usage

uppertriangle(
  data,
  columns = 1:ncol(data),
  color = NULL,
  corMethod = "pearson"
)

Arguments

data

a data matrix. Should contain numerical (continuous) data.

columns

an option to choose the column to be used in the raw dataset. Defaults to 1:ncol(data)

color

an option to choose a factor variable to be grouped with. Defaults to (NULL)

corMethod

method argument supplied to cor

Author(s)

Mengjia Ni, Di Cook

Examples

data(flea)
head(uppertriangle(flea, columns=2:4))
head(uppertriangle(flea))
head(uppertriangle(flea, color="species"))

GGally

Extension to 'ggplot2'

v2.1.1
GPL (>= 2.0)
Authors
Barret Schloerke [aut, cre], Di Cook [aut, ths], Joseph Larmarange [aut], Francois Briatte [aut], Moritz Marbach [aut], Edwin Thoen [aut], Amos Elberg [aut], Ott Toomet [ctb], Jason Crowley [aut], Heike Hofmann [ths], Hadley Wickham [ths]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.