While trelliscopejs is a very powerful visualization paradigm, it can be hard to munge the data into the appropriate format. This function automatically creates a trelliscopejs visualization populated with 2D plots of each input distance in order to get a feel for the relationships each distance captures.

trellis_heatmap(data, path, name, diagonal = NULL, type = "ggplot2",
  group = "", desc = "", md_desc = "", height = 500, width = 500,
  nrow = 1, ncol = 1, cores = 1, verbose = TRUE)

Arguments

data

A list of 2D plot coordinates.

path

The base directory of the trelliscope application.

name

A string name of the display.

type

A string representing the plotting library. Options include "plotly" or "ggplot2".

group

Group that the display belongs to.

desc

Optional text description of the display.

md_desc

Optional string of markdown that will be shown in the viewer for additional context about the display.

height

Height in pixels of each panel.

width

Width in pixels of each panel.

nrow

The number of rows of panels to display by default.

ncol

The number of columns of panels to display by default.

cores

An integer value equal to 1 or greater for the number of computer cores to use.

verbose

TRUE or FALSE. Should the function tell you what is happening internally?

color_vec

NULL or a string vector of names to use the same length as the input data.

colors

NULL or a string vector of hex colors to use.

Value

A trellisopejs object populated with 2D plots.

Details

For the arguments aggregator and renderer see aggregatorName and rendererName arguments from the rpivotTable package. For all other arguments (except the data argument), see the identical arguments in the trelliscopejs package.

References

Muchmore, B., Muchmore P. and Alarcón-Riquelme ME. (2018). Optimal Distance Matrix Construction with PreciseDist and PreciseGraph.

Examples

# NOT RUN {
library(PreciseDist)

test_matrix <- replicate(10, rnorm(100))

test_dists <- test_matrix %>%
    precise_dist(c("manhattan", "euclidean"))

test_tsne <- test_dists %>%
  precise_tsne(data, file = NULL, max_iter = 1001, perplexity = 15, theta = 0.0, cores = 1, suffix = "", verbose = TRUE)

test_trellis <- test_tsne %>%
  trellis_plots(path, name, perplexity = 15, theta = 0.0, type = "ggplot2", color_vec = NULL, colors = NULL, group = "common",
               desc = "", md_desc = "", height = 500, width = 500, nrow = 1, ncol = 1, cores = 1, verbose = TRUE)
# }