
作者:(新西兰)哈德利·威克姆(Hadley
页数:492
出版社:东南大学出版社
出版日期:2017
ISBN:9787564173531
电子书格式:pdf/epub/txt
内容简介
本书深入浅出地讲解如何使用R语言玩转数据。书中涵盖R语言编程的方方面面,内容涉及R对象的类型、R的记号体系和环境系统、自定义函数、if?else语句、for循环、S3类、R的包系统以及调试工具等。本书还通过示例演示如何进行向量化编程,从而对代码进行提速并尽可能地发挥R的潜能。本书适合立志成为数据科学家的R语言初学者阅读。
作者简介
Hadley Wickham,是RStudio的首席科学家以及R基金会成员。他构建了一套使数据科学变得更加快捷、富有乐趣的工具。可以通过其个人网站了解更多的信息:http://hadley.nz。
Garrett Grolemund,是一名统计学家、教师以及RStudio的硕士生导师。他还是《Hands-On Programming with R 》(O’Reilly)一书的作者。Garrett的很多授课视频可以在oreilly.com/safari上找到。
本书特色
本书深入浅出地讲解如何使用R语言玩转数据。书中涵盖R语言编程的方方面面,内容涉及R对象的类型、R的记号体系和环境系统、自定义函数、if?else语句、for循环、S3类、R的包系统以及调试工具等。本书还通过示例演示如何进行向量化编程,从而对代码进行提速并尽可能地发挥R的潜能。本书适合立志成为数据科学家的R语言初学者阅读。
目录
PrefacePart I. Explore 1. Data Visualization with ggplot2 Introduction First Steps Aesthetic Mappings Common Problems Facets Geometric Objects Statistical Transformations Position Adjustments Coordinate Systems The Layered Grammar of Graphics 2. Workflow: Basics Coding Basics What’s in a Name
Calling Functions 3. Data Transformation with dplyr Introduction Filter Rows with filter() Arrange Rows with arrange() Select Columns with select() Add New Variables with mutate() Grouped Summaries with summarize() Grouped Mutates (and Filters) 4. W0rkfl0w: Scripts Running Code RStudio Diagnostics 5. Exploratory Data Analysis Introduction Questions Variation Missing Values Covariation Patterns and Models ggplot2 Calls Learning More 6. Workflow: Projects What Is Real
Where Does Your Analysis Live
Paths and Directories RStudio Projects SummaryPart II. Wrangle 7. Tibbles with tibble Introduction Creating Tibbles Tibbles Versus data.frame Interacting with Older Code 8. Data Import with readr Introduction Getting Started Parsing a Vector Parsing a File Writing to a File Other Types of Data 9. Tidy Data with tidyr Introduction Tidy Data Spreading and Gathering Separating and Pull Missing Values Case Study Nontidy Data 10. Relational Data with dplyr Introduction nycflightsl3 Keys Mutating loins Filtering loins loin Problems Set Operations 11. Strings with stringr Introduction String Basics Matching Patterns with Regular Expressions Tools Other Types of Pattern Other Uses of Regular Expressions stringi 12. Factors with forcats Introduction Creating Factors General Social Survey Modifying Factor Order Modifying Factor Levels 13. Dates and Times with lubridate Introduction Creating Date/Times Date-Time Components Time Spans Time ZonesPart III. Program 14. Pipeswith magrittr Introduction Piping Alternatives When Not to Use the Pipe Other Tools from magrittr 15. Functions Introduction When Should You Write a Function
Functions Are for Humans and Computers Conditional Execution Function Arguments Return Values Environment 16. Vectors Introduction Vector Basics Important Types of Atomic Vector Using Atomic Vectors Recursive Vectors (Lists) Attributes Augmented Vectors 17. Iteration with purrr Introduction For Loops For Loop Variations For Loops Versus Functionals The Map Functions Dealing with Failure Mapping over Multiple Arguments Walk Other Patterns of For LoopsPart IV. Model 18. Model Basics with modelr Introduction A Simple Model Visualizing Models Formulas and Model Families Missing Values Other Model Families 19. Model Building Introduction Why Are Low-Quality Diamonds More Expensive
What Affects the Number of Daily Flights
Learning More About Models 20. Many Models with purrr and broom Introduction gapminder List-Columns Creating List-Columns Simplifying List-Columns Making Tidy Data with broomPart V. Communicate 21. R Markdown Introduction R Markdown Basics Text Formatting with Markdown Code Chunks Troubleshooting YAML Header Learning More 22. Graphics for Communication with ggplot2 Introduction Label Annotations Scales Zooming Themes Saving Your Plots Learning More 23. R Markdown Formats Introduction Output Options Documents Notebooks Presentations Dashboards Interactivity Websites Other Formats Learning More 24. R Markdown WorkflowIndex
Calling Functions 3. Data Transformation with dplyr Introduction Filter Rows with filter() Arrange Rows with arrange() Select Columns with select() Add New Variables with mutate() Grouped Summaries with summarize() Grouped Mutates (and Filters) 4. W0rkfl0w: Scripts Running Code RStudio Diagnostics 5. Exploratory Data Analysis Introduction Questions Variation Missing Values Covariation Patterns and Models ggplot2 Calls Learning More 6. Workflow: Projects What Is Real
Where Does Your Analysis Live
Paths and Directories RStudio Projects SummaryPart II. Wrangle 7. Tibbles with tibble Introduction Creating Tibbles Tibbles Versus data.frame Interacting with Older Code 8. Data Import with readr Introduction Getting Started Parsing a Vector Parsing a File Writing to a File Other Types of Data 9. Tidy Data with tidyr Introduction Tidy Data Spreading and Gathering Separating and Pull Missing Values Case Study Nontidy Data 10. Relational Data with dplyr Introduction nycflightsl3 Keys Mutating loins Filtering loins loin Problems Set Operations 11. Strings with stringr Introduction String Basics Matching Patterns with Regular Expressions Tools Other Types of Pattern Other Uses of Regular Expressions stringi 12. Factors with forcats Introduction Creating Factors General Social Survey Modifying Factor Order Modifying Factor Levels 13. Dates and Times with lubridate Introduction Creating Date/Times Date-Time Components Time Spans Time ZonesPart III. Program 14. Pipeswith magrittr Introduction Piping Alternatives When Not to Use the Pipe Other Tools from magrittr 15. Functions Introduction When Should You Write a Function
Functions Are for Humans and Computers Conditional Execution Function Arguments Return Values Environment 16. Vectors Introduction Vector Basics Important Types of Atomic Vector Using Atomic Vectors Recursive Vectors (Lists) Attributes Augmented Vectors 17. Iteration with purrr Introduction For Loops For Loop Variations For Loops Versus Functionals The Map Functions Dealing with Failure Mapping over Multiple Arguments Walk Other Patterns of For LoopsPart IV. Model 18. Model Basics with modelr Introduction A Simple Model Visualizing Models Formulas and Model Families Missing Values Other Model Families 19. Model Building Introduction Why Are Low-Quality Diamonds More Expensive
What Affects the Number of Daily Flights
Learning More About Models 20. Many Models with purrr and broom Introduction gapminder List-Columns Creating List-Columns Simplifying List-Columns Making Tidy Data with broomPart V. Communicate 21. R Markdown Introduction R Markdown Basics Text Formatting with Markdown Code Chunks Troubleshooting YAML Header Learning More 22. Graphics for Communication with ggplot2 Introduction Label Annotations Scales Zooming Themes Saving Your Plots Learning More 23. R Markdown Formats Introduction Output Options Documents Notebooks Presentations Dashboards Interactivity Websites Other Formats Learning More 24. R Markdown WorkflowIndex















