This function will run heatmap on the output of precise_dist or a list of distance matrices.

precise_heatmap(data, method = "complete", type = "ggplot2",
  diagonal = NULL, parallel = FALSE, verbose = FALSE)

Arguments

data

A square, numeric dataframe, matrix or tibble.

verbose

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

max_iter

A positive integer for the number of iterations. See details.

perplexity

A positive integer that loosely equates to the number of nearest neighboors. See details.

theta

A positive numeric value between 0-1 that toggles between exact heatmap and Barnes-Hut heatmap. See details.

suffix

A string to be used as the suffix for the output distance name.

file

NULL or the absolute path to save the results as an RData file.

cores

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

Value

A list of heatmap results, which can be viewed with trellis_heatmap.

Details

toggles between two versions of heatmap. If theta = 0.0, a modified version of heatmap is run, otherwise if theta > 0.0, heatmap is run.

References

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

Examples

library(PreciseDist) test_matrix <- replicate(10, rnorm(100)) test_dists <- test_matrix %>% precise_dist(c("manhattan", "euclidean"))
#> [1] "Starting dists calculations at 2018-11-29 15:20:24" #> [1] "Finished dists calculations at 2018-11-29 15:20:25" #> [1] "Calculations took: 0.5 seconds" #> [1] "Starting dist_funcs calculations at 2018-11-29 15:20:25" #> [1] "Finished dist_funcs calculations at 2018-11-29 15:20:25" #> [1] "Calculations took: 0 seconds"
test_heatmap <- test_dists %>% precise_heatmap(data, file = NULL, max_iter = 1001, perplexity = 15, theta = 0.0, cores = 1, suffix = "", verbose = TRUE)
#> Error in precise_heatmap(., data, file = NULL, max_iter = 1001, perplexity = 15, theta = 0, cores = 1, suffix = "", verbose = TRUE): unused arguments (file = NULL, max_iter = 1001, perplexity = 15, theta = 0, cores = 1, suffix = "")