Learn R Programming

googleVis (version 0.5.1)

gvisTreeMap: Google Tree Map with R googleChartName <- "treemap" gvisChartName <- "gvisTreeMap"

Usage

gvisTreeMap(data, idvar = "", parentvar = "", sizevar = "",
  colorvar = "", options = list(), chartid)

Arguments

data
a data.frame. The data has to have at least four columns. Each row in the data table describes one node (a rectangle in the graph). Each node (except the root node) has one or more parent nodes. Each node is sized and colored accordin
idvar
column name of data describing the ID for each node. It can be any valid JavaScript string, including spaces, and any length that a string can hold. This value is displayed as the node header.
parentvar
column name of data that match to entries in idvar. If this is a root node, leave this NA. Only one root is allowed per treemap.
sizevar
column name of data with positive values to define the size of maps. Any positive value is allowed. This value determines the size of the node, computed relative to all other nodes currently shown. This value is ignored for non-leaf
colorvar
column name of data with values to define range of color. The value is used to calculate a color for this node. Any value, positive or negative, is allowed. The color value is first recomputed on a scale from minColorValue
options
list of configuration options, see: [results=rd]{gsub("CHARTNAME", googleChartName, readLines(file.path(".", "inst", "mansections", "GoogleChartToolsURLConfigOptions.txt")))}

[results=rd]{paste(readLines(file.path(".", "inst", "ma