lowertriangle - rearrange dataset as the preparation of ggscatmat
function
Source: R/ggscatmat.R
lowertriangle.Rd
function for making the melted dataset used to plot the lowertriangle scatterplots.
Usage
lowertriangle(data, columns = 1:ncol(data), color = NULL)
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