Learn R Programming

clusterfly (version 0.4)

cfly_dist: Static plot: Variable distribution. Draw a density plot for each continuous variable, facetted across clustering.

Description

This allows you to quickly visualise how the cluster vary in a univariate manner. Currently, it is a bit of a hack, because ggplot does not support plots with different scales, so the variables are manually rescaled prior to plotting.

Usage

cfly_dist(cfly, index, scale = "range")

Arguments

cfly
clusterfly object
index
clustering to use
scale
scaling to use

Details

This plot is inspired by Gaguin http://www.rosuda.org/gaguin.

Examples

Run this code
if (require("ggplot2")) {
o <- olive_example()
cfly_dist(o, "kmeans")
cfly_dist(o, "kmeans") + scale_y_continuous(limit=c(0, 2))
}

Run the code above in your browser using DataLab