没有合适的资源?快使用搜索试试~ 我知道了~
R Graphics Cookbook 1st 原版PDF by Chang
需积分: 10 5 下载量 197 浏览量
2018-05-05
10:33:50
上传
评论
收藏 11.29MB PDF 举报
温馨提示
I started using R several years ago to analyze data I had collected for my research in graduate school. My motivation at first was to escape from the restrictive environments and canned analyses offered by statistical programs like SPSS. And even better, because it’s freely available, I didn’t need to convince someone to buy me a copy of the software— very important for a poor graduate student! As I delved deeper into R, I discovered that it could also create excellent data graphics.
资源推荐
资源详情
资源评论
Winston Chang
R Graphics Cookbook
ISBN: 978-1-449-31695-2
[CK]
R Graphics Cookbook
by Winston Chang
Copyright © 2013 Winston Chang. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are
also available for most titles (http://my.safaribooksonline.com). For more information, contact our corporate/
institutional sales department: 800-998-9938 or corporate@oreilly.com.
Editors: Mike Loukides and Courtney Nash
Production Editor: Holly Bauer
Copyeditor: Rachel Head
Proofreader: Jilly Gagnon
Indexer: Lucie Haskins
Cover Designer: Randall Comer
Interior Designer: David Futato
Illustrator: Rebecca Demarest and Robert Romano
December 2012:
First Edition
Revision History for the First Edition:
2012-12-04 First release
See http://oreilly.com/catalog/errata.csp?isbn=9781449316952 for release details.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly
Media, Inc. R Graphics Cookbook, the image of a reindeer, and related trade dress are trademarks of O’Reilly
Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a trade‐
mark claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and authors assume
no responsibility for errors or omissions, or for damages resulting from the use of the information contained
herein.
Table of Contents
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
1. R Basics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1. Installing a Package 1
1.2. Loading a Package 2
1.3. Loading a Delimited Text Data File 3
1.4. Loading Data from an Excel File 4
1.5. Loading Data from an SPSS File 5
2.
Quickly Exploring Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.1. Creating a Scatter Plot 7
2.2. Creating a Line Graph 9
2.3. Creating a Bar Graph 11
2.4. Creating a Histogram 13
2.5. Creating a Box Plot 15
2.6. Plotting a Function Curve 17
3.
Bar Graphs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.1. Making a Basic Bar Graph 19
3.2. Grouping Bars Together 22
3.3. Making a Bar Graph of Counts 25
3.4. Using Colors in a Bar Graph 27
3.5. Coloring Negative and Positive Bars Differently 29
3.6. Adjusting Bar Width and Spacing 30
3.7. Making a Stacked Bar Graph 32
3.8. Making a Proportional Stacked Bar Graph 35
3.9. Adding Labels to a Bar Graph 38
3.10. Making a Cleveland Dot Plot 42
4. Line Graphs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
iii
4.1. Making a Basic Line Graph 49
4.2. Adding Points to a Line Graph 52
4.3. Making a Line Graph with Multiple Lines 53
4.4. Changing the Appearance of Lines 58
4.5. Changing the Appearance of Points 59
4.6. Making a Graph with a Shaded Area 62
4.7. Making a Stacked Area Graph 64
4.8. Making a Proportional Stacked Area Graph 67
4.9. Adding a Confidence Region 69
5. Scatter Plots. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
5.1. Making a Basic Scatter Plot 73
5.2. Grouping Data Points by a Variable Using Shape or Color 75
5.3. Using Different Point Shapes 77
5.4. Mapping a Continuous Variable to Color or Size 80
5.5. Dealing with Overplotting 84
5.6. Adding Fitted Regression Model Lines 89
5.7. Adding Fitted Lines from an Existing Model 94
5.8. Adding Fitted Lines from Multiple Existing Models 97
5.9. Adding Annotations with Model Coefficients 100
5.10. Adding Marginal Rugs to a Scatter Plot 103
5.11. Labeling Points in a Scatter Plot 104
5.12. Creating a Balloon Plot 110
5.13. Making a Scatter Plot Matrix 112
6.
Summarized Data Distributions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
6.1. Making a Basic Histogram 117
6.2. Making Multiple Histograms from Grouped Data 120
6.3. Making a Density Curve 123
6.4. Making Multiple Density Curves from Grouped Data 126
6.5. Making a Frequency Polygon 129
6.6. Making a Basic Box Plot 130
6.7. Adding Notches to a Box Plot 133
6.8. Adding Means to a Box Plot 134
6.9. Making a Violin Plot 135
6.10. Making a Dot Plot 139
6.11. Making Multiple Dot Plots for Grouped Data 141
6.12. Making a Density Plot of Two-Dimensional Data 143
7.
Annotations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
7.1. Adding Text Annotations 147
7.2. Using Mathematical Expressions in Annotations 150
iv | Table of Contents
剩余410页未读,继续阅读
资源评论
nn123456789
- 粉丝: 14
- 资源: 128
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- XIHE_Meteorological_Data_1730421195.csv
- 后台运行的写日志win32程序
- 一种用于减轻信息统计压力的个人信息生成软件
- 【源码+数据库】采用Java Swing+mysql实现的餐厅点餐系统
- Hex和Float数据转换工具
- 【java毕业设计】基于Spring Boot的养老院管理系统(springboot+vue+mysql+说明文档).zip
- 【java毕业设计】springboot在线问诊系统的设计与实现(springboot+vue+mysql+说明文档).zip
- ESP32乐鑫开发中ESP-IDF离线安装包
- 基于 Java 实现的房源数据爬虫 支持断点续爬,价格变更通知,提供数据的分析统计服务
- arm架构mysql5.7.44,mysql-5.7.44-linux-aarch64.tar.gz
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功