EVOLUTION-MANAGER
Edit File: getBclustClassIntervals.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Change breaks in a "classIntervals" object</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for getBclustClassIntervals {classInt}"><tr><td>getBclustClassIntervals {classInt}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Change breaks in a "classIntervals" object</h2> <h3>Description</h3> <p>Because "classIntervals" objects of style "hclust" or "bclust" contain hierarchical classification trees in their "par" attribute, different numbers of classes can be chosen without repeating the initial classification. This function accesses the "par" attribute and modifies the "brks" member of the returned "classIntervals" object. </p> <h3>Usage</h3> <pre> getBclustClassIntervals(clI, k) getHclustClassIntervals(clI, k) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>clI</code></td> <td> <p>a "classIntervals" object</p> </td></tr> <tr valign="top"><td><code>k</code></td> <td> <p>number of classes required</p> </td></tr> </table> <h3>Value</h3> <p>a "classIntervals" object with a "modified" attribute set </p> <h3>Author(s)</h3> <p>Roger Bivand <Roger.Bivand@nhh.no></p> <h3>See Also</h3> <p><code><a href="classIntervals.html">classIntervals</a></code></p> <h3>Examples</h3> <pre> if (!require("spData", quietly=TRUE)) { message("spData package needed for examples") run <- FALSE } else { run <- TRUE } if (run) { data(jenks71, package="spData") pal1 <- c("wheat1", "red3") opar <- par(mfrow=c(2,2)) hCI5 <- classIntervals(jenks71$jenks71, n=5, style="hclust", method="complete") plot(attr(hCI5, "par")) plot(hCI5, pal=pal1, main="hclust k=5") plot(getHclustClassIntervals(hCI5, k=7), pal=pal1, main="hclust k=7") plot(getHclustClassIntervals(hCI5, k=9), pal=pal1, main="hclust k=9") par(opar) } if (run) { set.seed(1) bCI5 <- classIntervals(jenks71$jenks71, n=5, style="bclust") plot(attr(bCI5, "par")) } if (run) { opar <- par(mfrow=c(2,2)) plot(getBclustClassIntervals(bCI5, k=3), pal=pal1, main="bclust k=3") plot(bCI5, pal=pal1, main="bclust k=5") plot(getBclustClassIntervals(bCI5, k=7), pal=pal1, main="bclust k=7") plot(getBclustClassIntervals(bCI5, k=9), pal=pal1, main="bclust k=9") par(opar) } </pre> <hr /><div style="text-align: center;">[Package <em>classInt</em> version 0.4-3 <a href="00Index.html">Index</a>]</div> </body></html>