没有合适的资源?快使用搜索试试~ 我知道了~
首页Advanced R 原版PDF by Wickham
Advanced R 原版PDF by Wickham

With more than 10 years experience programming in R, I’ve had the luxury of being able to spend a lot of time trying to figure out and understand how the language works. This book is my attempt to pass on what I’ve learned so that you can quickly become an effective R programmer. Reading it will help you avoid the mistakes I’ve made and dead ends I’ve gone down, and will teach you useful tools, techniques, and idioms that can help you to attack many types of problems. In the process, I hope to show that, despite its frustrating quirks, R is, at its heart, an elegant and beautiful language, well tailored for data analysis and statistics
资源详情
资源评论
资源推荐

“The author has become one of the foremost authorities on this
topic and is well known and appreciated throughout the entire R
community. This is the great strength of the book and the primary
reason it deserves to be published. It addresses a topic where there
is already a growing number of books, but few have the depth, the
technical accuracy, and the authority of this one.”
—Bill Venables, CSIRO
Advanced R presents useful tools and techniques for attacking
many types of R programming problems, helping you avoid mis-
takes and dead ends. With more than ten years of experience pro-
gramming in R, the author illustrates the elegance, beauty, and ex-
ibility at the heart of R.
The book develops the necessary skills to produce quality code that
can be used in a variety of circumstances. You will learn:
• The fundamentals of R, including standard data types and
functions
• Functional programming as a useful framework for solving wide
classes of problems
• The positives and negatives of metaprogramming
• How to write fast, memory-efcient code
This book not only helps current R users become R programmers
but also shows existing programmers what’s special about R. Inter-
mediate R programmers can dive deeper into R and learn new strat-
egies for solving diverse problems while programmers from other
languages can learn the details of R and understand why R works
the way it does.
The R Series
Statistics
Advanced R
Hadley Wickham
Advanced R
Wickham
K20319
www.crcpress.com
K20319_cover.indd 1 8/20/14 3:21 PM

Advanced R
Hadley Wickham
K20319_FM.indd 5 8/25/14 12:28 PM

CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742
© 2015 by Taylor & Francis Group, LLC
CRC Press is an imprint of Taylor & Francis Group, an Informa business
No claim to original U.S. Government works
Version Date: 20140813
International Standard Book Number-13: 978-1-4665-8697-0 (eBook - PDF)
This book contains information obtained from authentic and highly regarded sources. Reasonable
efforts have been made to publish reliable data and information, but the author and publisher cannot
assume responsibility for the validity of all materials or the consequences of their use. The authors and
publishers have attempted to trace the copyright holders of all material reproduced in this publication
and apologize to copyright holders if permission to publish in this form has not been obtained. If any
copyright material has not been acknowledged please write and let us know so we may rectify in any
future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced,
transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or
hereafter invented, including photocopying, microfilming, and recording, or in any information stor-
age or retrieval system, without written permission from the publishers.
For permission to photocopy or use material electronically from this work, please access www.copy-
right.com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222
Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that pro-
vides licenses and registration for a variety of users. For organizations that have been granted a photo-
copy license by the CCC, a separate system of payment has been arranged.
Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are
used only for identification and explanation without intent to infringe.
Visit the Taylor & Francis Web site at
http://www.taylorandfrancis.com
and the CRC Press Web site at
http://www.crcpress.com

Contents
1Introduction1
1.1Whoshouldreadthisbook. . . . . . . . . . . . . . . .3
1.2Whatyouwillgetoutofthisbook. . . . . . . . . . . .3
1.3Meta-techniques. . . . . . . . . . . . . . . . . . . . . .4
1.4Recommendedreading. . . . . . . . . . . . . . . . . .5
1.5Gettinghelp. . . . . . . . . . . . . . . . . . . . . . . .6
1.6Acknowledgments. . . . . . . . . . . . . . . . . . . . .6
1.7Conventions. . . . . . . . . . . . . . . . . . . . . . . .8
1.8Colophon. . . . . . . . . . . . . . . . . . . . . . . . . .8
IFoundations11
2Datastructures13
2.1Vectors. . . . . . . . . . . . . . . . . . . . . . . . . . .14
2.1.1Atomicvectors. . . . . . . . . . . . . . . . . . .15
2.1.1.1Typesandtests. . . . . . . . . . . . .16
2.1.1.2Coercion. . . . . . . . . . . . . . . . .16
2.1.2Lists . . . . . . . . . . . . . . . . . . . . . . . . .17
2.1.3Exercises. . . . . . . . . . . . . . . . . . . . . .19
2.2Attributes. . . . . . . . . . . . . . . . . . . . . . . . .19
2.2.0.1Names. . . . . . . . . . . . . . . . . .20
2.2.1Factors. . . . . . . . . . . . . . . . . . . . . . .21
2.2.2Exercises. . . . . . . . . . . . . . . . . . . . . .23
2.3Matricesandarrays. . . . . . . . . . . . . . . . . . . .24
ix

xContents
2.3.1Exercises. . . . . . . . . . . . . . . . . . . . . .26
2.4Dataframes. . . . . . . . . . . . . . . . . . . . . . . .27
2.4.1Creation. . . . . . . . . . . . . . . . . . . . . . .27
2.4.2Testingandcoercion. . . . . . . . . . . . . . . .28
2.4.3Combiningdataframes. . . . . . . . . . . . . .28
2.4.4Specialcolumns. . . . . . . . . . . . . . . . . . .29
2.4.5Exercises. . . . . . . . . . . . . . . . . . . . . .30
2.5Answers. . . . . . . . . . . . . . . . . . . . . . . . . . .31
3Subsetting33
3.1Datatypes. . . . . . . . . . . . . . . . . . . . . . . . .34
3.1.1Atomicvectors. . . . . . . . . . . . . . . . . . .34
3.1.2Lists . . . . . . . . . . . . . . . . . . . . . . . . .37
3.1.3Matricesandarrays. . . . . . . . . . . . . . . .37
3.1.4Dataframes. . . . . . . . . . . . . . . . . . . . .38
3.1.5S3objects . . . . . . . . . . . . . . . . . . . . . .39
3.1.6S4objects . . . . . . . . . . . . . . . . . . . . . .39
3.1.7Exercises. . . . . . . . . . . . . . . . . . . . . .39
3.2Subsettingoperators. . . . . . . . . . . . . . . . . . . .40
3.2.1Simplifyingvs.preservingsubsetting . . . . . . .41
3.2.2$. . . . . . . . . . . . . . . . . . . . . . . . . . .43
3.2.3Missing/outofboundsindices. . . . . . . . . . .44
3.2.4Exercises. . . . . . . . . . . . . . . . . . . . . .45
3.3Subsettingandassignment. . . . . . . . . . . . . . . .45
3.4Applications. . . . . . . . . . . . . . . . . . . . . . . .46
3.4.1Lookuptables(charactersubsetting). . . . . . .46
3.4.2Matchingandmerging by hand(integersubset-
ting). . . . . . . . . . . . . . . . . . . . . . . . .47
3.4.3Randomsamples/bootstrap(integersubsetting)48
3.4.4Ordering(integersubsetting). . . . . . . . . . .49
剩余467页未读,继续阅读






nn123456789
- 粉丝: 14
- 资源: 128
上传资源 快速赚钱
我的内容管理 收起
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助

会员权益专享
最新资源
- ARM Cortex-A(armV7)编程手册V4.0.pdf
- ABB机器人保养总结解析.ppt
- 【超详细图解】菜鸡如何理解双向链表的python代码实现
- 常用网络命令的使用 ipconfig ping ARP FTP Netstat Route Tftp Tracert Telnet nslookup
- 基于单片机控制的DC-DC变换电路
- RS-232接口电路的ESD保护.pdf
- linux下用time(NULL)函数和localtime()获取当前时间的方法
- Openstack用户使用手册.docx
- KUKA KR 30 hA,KR 60 hA机器人产品手册.pdf
- Java programming with JNI
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制

评论1