dfCompile.matrix: Creates a list of data frames for 'tree' objects (for...

Description Usage Arguments Value Examples

View source: R/matrix.R

Description

TODO: get the function for reorder.dendrogram

Usage

1
dfCompile.matrix(x, type = "image", ...)

Arguments

x

matrix object

type

string of either "image" or "heatmap" the tells the function whether to display the matrix directly as an image or to reorder the columns and create a dendrogram. Note, the heatmap is a more general case of the image function call

...

additional parameters (see Details section)

Value

returns a list of 1 data frame and 2 lists

df

contains a 'melted' data frame to visualize the matrix

dendro_row

a list of information about the row dendrogram in the form of dendro_data, namely a (1) a data frame called "segments" that contains containing the line segment data to create the dendrogram, (2) a data frame containing the label text data called "labels" - assoicated with the leafs, (3) empty list element labeled "leaf_labels", and (4) a "class" element detailing the type of object it is representing (in this case always "dendrogram")

dendro_col

a similar list object like dendro_row but for the column dendrogram

.

Note, if no dendrograms are required to be made, the entry for dendro_row and dendro_col is stored as NULL

Examples

1
2
3
4
5
6
7
library(tidyverse)
data(iris)
iris_c <- iris %>% select(-Species) %>% cor

data_list <- dfCompile.matrix(iris_c, type = "heatmap")

data_list2 <- dfCompile.matrix(iris_c, type = "image")

benjaminleroy/ggDiagnose documentation built on May 4, 2019, 3:07 a.m.