Last data update: 2014.03.03

R: lowertriangle - rearrange dataset as the preparation of...
lowertriangleR Documentation

lowertriangle - rearrange dataset as the preparation of ggscatmat function

Description

function for making the melted dataset used to plot the lowertriangle scatterplots.

Usage

lowertriangle(data, columns = 1:ncol(data), color = NULL)

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)

Author(s)

Mengjia Ni, Di Cook dicook@monash.edu

Examples

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

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(GGally)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/GGally/lowertriangle.Rd_%03d_medium.png", width=480, height=480)
> ### Name: lowertriangle
> ### Title: lowertriangle - rearrange dataset as the preparation of
> ###   ggscatmat function
> ### Aliases: lowertriangle
> 
> ### ** Examples
> 
> data(flea)
> head(lowertriangle(flea, columns= 2:4))
  xvalue yvalue xslot yslot  xlab  ylab
1    191     NA     1     1 tars1 tars1
2    185     NA     1     1 tars1 tars1
3    200     NA     1     1 tars1 tars1
4    173     NA     1     1 tars1 tars1
5    171     NA     1     1 tars1 tars1
6    160     NA     1     1 tars1 tars1
> head(lowertriangle(flea))
  xvalue yvalue xslot yslot  xlab  ylab
1    191     NA     1     1 tars1 tars1
2    185     NA     1     1 tars1 tars1
3    200     NA     1     1 tars1 tars1
4    173     NA     1     1 tars1 tars1
5    171     NA     1     1 tars1 tars1
6    160     NA     1     1 tars1 tars1
> head(lowertriangle(flea, color="species"))
  xvalue yvalue xslot yslot  xlab  ylab colorcolumn
1    191     NA     1     1 tars1 tars1    Concinna
2    185     NA     1     1 tars1 tars1    Concinna
3    200     NA     1     1 tars1 tars1    Concinna
4    173     NA     1     1 tars1 tars1    Concinna
5    171     NA     1     1 tars1 tars1    Concinna
6    160     NA     1     1 tars1 tars1    Concinna
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>