plot_kNN_mean_dist: Plot distance to kNN

Description Usage Arguments Value

Description

Computes average distance to K nearest neighbours and plots the values for every data point ordered according to coordinates computed with BUDS.

Usage

1
2
plot_kNN_mean_dist(D, tau, K = NULL, color = "blue",
  color_label = "Covariate", error_bars = FALSE)

Arguments

D

A dissimilarity matrix.

tau

A numeric vector of latent 1D coordinates.

K

[Optional] An integer indicating the number of points to include in the neighbourhood. If not specified one tenth of the total number of data points is used.

color

[Optional] A vector or a character string for point colors.

color_label

[Optional] A character string for the color label.

error_bars

[Optional] Whether to include error bars in the plot.

Value

A ggplot2 object.


nlhuong/buds documentation built on May 17, 2019, 3:13 a.m.