1 Star 0 Fork 3

weijiew/R-graph-gallery

forked from 程序员维C社区/graph 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
234-a-very-basic-treemap.Rmd 2.09 KB
一键复制 编辑 原始数据 按行查看 历史
Holtz Yan 提交于 2019-03-29 01:17 +08:00 . Treemap section is OK
title descriptionMeta descriptionTop sectionText sectionLink DataToVizText DataToVizLink url output
Most basic treemap with R
This post explains how to build a very basic treemap with R. It uses the treemap package, provides reproducible code and explain how input data must be formatted.
This post explains how to build a very basic [treemap](treemap.html) with `R`. It uses the `treemap` package, provides reproducible code and explains how input data must be formatted.
Treemap section
treemap.html
Data to Viz
data-to-viz.com/graph/treemap.html
234-a-very-basic-treemap
html_document
self_contained mathjax lib_dir template css toc toc_float toc_depth df_print
false
default
libs
template_rgg.html
style.css
true
true
2
paged
```{r global options, include = FALSE} knitr::opts_chunk$set( warning=FALSE, message=FALSE) ```
# Most basic treemap ***
This is the most basic [treemap](treemap.html) you can do. The input dataset is simple: we just have 3 groups, and each has a value which we map to an area. It allows to learn the syntax of the `treemap` library: you need to provide at least a dataset (`data`), the column that provides groups (`index`), and the column that gives the size of each group (`vSize`). See graph [#235](235-treemap-with-subgroups.html) to learn how to add subgroups, and graph [#236](236-custom-your-treemap.html) to customize the chart appearance.
```{r thecode, echo=FALSE, out.width = "100%", fig.height=7} # library library(treemap) # Create data group
```{r thecode, eval=FALSE} ```
```{r, echo=FALSE} htmltools::includeHTML("htmlChunkRelatedPartOfWhole.html") ```
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/weijiew/R-graph-gallery.git
git@gitee.com:weijiew/R-graph-gallery.git
weijiew
R-graph-gallery
R-graph-gallery
master

搜索帮助