R For Dummies (eBook)
411 Seiten
Wiley (Verlag)
978-1-119-96312-7 (ISBN)
Master the programming language of choice among statisticians and data analysts worldwide
Coming to grips with R can be tough, even for seasoned statisticians and data analysts. Enter R For Dummies, the quick, easy way to master all the R you'll ever need. Requiring no prior programming experience and packed with practical examples, easy, step-by-step exercises, and sample code, this extremely accessible guide is the ideal introduction to R for complete beginners. It also covers many concepts that intermediate-level programmers will find extremely useful.
- Master your R ABCs ? get up to speed in no time with the basics, from installing and configuring R to writing simple scripts and performing simultaneous calculations on many variables
- Put data in its place ? get to know your way around lists, data frames, and other R data structures while learning to interact with other programs, such as Microsoft Excel
- Make data dance to your tune ? learn how to reshape and manipulate data, merge data sets, split and combine data, perform calculations on vectors and arrays, and much more
- Visualize it ? learn to use R's powerful data visualization features to create beautiful and informative graphical presentations of your data
- Get statistical ? find out how to do simple statistical analysis, summarize your variables, and conduct classic statistical tests, such as t-tests
- Expand and customize R ? get the lowdown on how to find, install, and make the most of add-on packages created by the global R community for a wide variety of purposes
- Open the book and find:
- Help downloading, installing, and configuring R
- Tips for getting data in and out of R
- Ways to use data frames and lists to organize data
- How to manipulate and process data
- Advice on fitting regression models and ANOVA
- Helpful hints for working with graphics
- How to code in R
- What R mailing lists and forums can do for you
Andrie de Vries is a market research consultant specializing in surveys, statistical analysis, and strategy.
Joris Meys is a statistician and R programmer with the faculty of bio-engineering at the University of Ghent.
Master the programming language of choice among statisticians and data analysts worldwide Coming to grips with R can be tough, even for seasoned statisticians and data analysts. Enter R For Dummies, the quick, easy way to master all the R you'll ever need. Requiring no prior programming experience and packed with practical examples, easy, step-by-step exercises, and sample code, this extremely accessible guide is the ideal introduction to R for complete beginners. It also covers many concepts that intermediate-level programmers will find extremely useful. Master your R ABCs ? get up to speed in no time with the basics, from installing and configuring R to writing simple scripts and performing simultaneous calculations on many variables Put data in its place ? get to know your way around lists, data frames, and other R data structures while learning to interact with other programs, such as Microsoft Excel Make data dance to your tune ? learn how to reshape and manipulate data, merge data sets, split and combine data, perform calculations on vectors and arrays, and much more Visualize it ? learn to use R's powerful data visualization features to create beautiful and informative graphical presentations of your data Get statistical ? find out how to do simple statistical analysis, summarize your variables, and conduct classic statistical tests, such as t-tests Expand and customize R ? get the lowdown on how to find, install, and make the most of add-on packages created by the global R community for a wide variety of purposes Open the book and find: Help downloading, installing, and configuring R Tips for getting data in and out of R Ways to use data frames and lists to organize data How to manipulate and process data Advice on fitting regression models and ANOVA Helpful hints for working with graphics How to code in R What R mailing lists and forums can do for you
Andrie de Vries is a market research consultant specializing in surveys, statistical analysis, and strategy. Joris Meys is a statistician and R programmer with the faculty of bio-engineering at the University of Ghent.
R For Dummies 1
About the Authors 5
Dedication 6
Authors’ Acknowledgments 6
Contents at a Glance 9
Table of Contents 11
Introduction 21
About This Book 21
Conventions Used in This Book 22
What You’re Not to Read 23
Foolish Assumptions 24
How This Book Is Organized 24
Icons Used in This Book 26
Where to Go from Here 26
Part I: R You Ready? 27
Chapter 1: Introducing R: The Big Picture 29
Recognizing the Benefits of Using R 30
Looking At Some of the Unique Features of R 32
Chapter 2: Exploring R 35
Working with a Code Editor 36
Starting Your First R Session 42
Sourcing a Script 45
Navigating the Workspace 48
Chapter 3: The Fundamentals of R 51
Using the Full Power of Functions 51
Keeping Your Code Readable 55
Getting from Base R to More 60
Part 2: Getting Down to Work in R 63
Chapter 4: Getting Started with Arithmetic 65
Working with Numbers, Infinity, and Missing Values 65
Organizing Data in Vectors 74
Getting Values in and out of Vectors 78
Working with Logical Vectors 81
Powering Up Your Math with Vector Functions 86
Chapter 5: Getting Started with Reading and Writing 91
Using Character Vectors for Text Data 91
Manipulating Text 96
Factoring in Factors 106
Chapter 6: Going on a Date with R 113
Working with Dates 113
Presenting Dates in Different Formats 115
Adding Time Information to Dates 117
Formatting Dates and Times 118
Performing Operations on Dates and Times 119
Chapter 7: Working in More Dimensions 123
Adding a Second Dimension 123
Using the Indices 127
Naming Matrix Rows and Columns 131
Calculating with Matrices 133
Adding More Dimensions 137
Combining Different Types of Values in a Data Frame 139
Manipulating Values in a Data Frame 143
Combining Different Objects in a List 149
Part III: Coding in R 157
Chapter 8: Putting the Fun in Functions 159
Moving from Scripts to Functions 159
Using Arguments the Smart Way 165
Coping with Scoping 170
Dispatching to a Method 174
Chapter 9: Controlling the Logical Flow 179
Making Choices with if Statements 180
Doing Something Else with an if... else Statement 182
Vectorizing Choices 183
Making Multiple Choices 186
Looping Through Values 188
Looping without Loops: Meeting the Apply Family 191
Chapter 10: Debugging Your Code 199
Knowing What to Look For 199
Reading Errors and Warnings 200
Going Bug Hunting 202
Generating Your Own Messages 207
Recognizing the Mistakes You’re Sure to Make 209
Chapter 11: Getting Help 213
Finding Information in the R Help Files 213
Searching the Web for Help with R 216
Getting Involved in the R Community 217
Making a Minimal Reproducible Example 219
Part IV: Making the Data Talk 223
Chapter 12: Getting Data into and out of R 225
Getting Data into R 225
Getting Your Data out of R 234
Working with Files and Folders 235
Chapter 13: Manipulating and Processing Data 239
Deciding on the Most Appropriate Data Structure 239
Creating Subsets of Your Data 241
Adding Calculated Fields to Data 247
Combining and Merging Data Sets 250
Sorting and Ordering Data 256
Traversing Your Data with the Apply Functions 260
Getting to Know the Formula Interface 265
Whipping Your Data into Shape 266
Chapter 14: Summarizing Data 273
Starting with the Right Data 273
Describing Continuous Variables 276
Describing Categories 278
Describing Distributions 281
Describing Multiple Variables 284
Working with Tables 290
Chapter 15: Testing Differences and Relations 295
Taking a Closer Look at Distributions 296
Comparing Two Samples 301
Testing Counts and Proportions 304
Working with Models 308
Part V: Working with Graphics 319
Chapter 16: Using Base Graphics 321
Creating Different Types of Plots 321
Controlling Plot Options and Arguments 328
Saving Graphics to Image Files 334
Chapter 17: Creating Faceted Graphics with Lattice 337
Creating a Lattice Plot 338
Changing Plot Options 341
Plotting Different Types 345
Plotting Data in Groups 347
Printing and Saving a Lattice Plot 351
Chapter 18: Looking At ggplot2 Graphics 353
Installing and Loading ggplot2 353
Looking At Layers 354
Using Geoms and Stats 355
Sussing Stats 360
Adding Facets, Scales, and Options 363
Getting More Information 366
Part VI: The Part of Tens 367
Chapter 19: Ten Things You Can Do in R That You Would’ve Done in Microsoft Excel 369
Adding Row and Column Totals 369
Formatting Numbers 370
Sorting Data 372
Making Choices with If 372
Calculating Conditional Totals 373
Transposing Columns or Rows 373
Finding Unique or Duplicated Values 374
Working with Lookup Tables 375
Working with Pivot Tables 375
Using the Goal Seek and Solver 376
Chapter 20: Ten Tips on Working with Packages 379
Poking Around the Nooks and Crannies of CRAN 379
Finding Interesting Packages 380
Installing Packages 380
Loading Packages 381
Reading the Package Manual and Vignette 381
Updating Packages 382
Unloading Packages 382
Forging Ahead with R-Forge 383
Conducting Installations from BioConductor 384
Reading the R Manual 384
Appendix: Installing R and RStudio 385
Installing and Configuring R 385
Installing and Configuring RStudio 388
Index 391
Erscheint lt. Verlag | 4.6.2012 |
---|---|
Sprache | englisch |
Themenwelt | Mathematik / Informatik ► Informatik ► Theorie / Studium |
Mathematik / Informatik ► Mathematik ► Computerprogramme / Computeralgebra | |
Schlagworte | Computer Science • Computer Science - General Interest • Informatik • Populäre Themen i. d. Informatik • Populäre Themen i. d. Informatik • R (Programm) |
ISBN-10 | 1-119-96312-5 / 1119963125 |
ISBN-13 | 978-1-119-96312-7 / 9781119963127 |
Haben Sie eine Frage zum Produkt? |
Größe: 15,8 MB
Kopierschutz: Adobe-DRM
Adobe-DRM ist ein Kopierschutz, der das eBook vor Mißbrauch schützen soll. Dabei wird das eBook bereits beim Download auf Ihre persönliche Adobe-ID autorisiert. Lesen können Sie das eBook dann nur auf den Geräten, welche ebenfalls auf Ihre Adobe-ID registriert sind.
Details zum Adobe-DRM
Dateiformat: PDF (Portable Document Format)
Mit einem festen Seitenlayout eignet sich die PDF besonders für Fachbücher mit Spalten, Tabellen und Abbildungen. Eine PDF kann auf fast allen Geräten angezeigt werden, ist aber für kleine Displays (Smartphone, eReader) nur eingeschränkt geeignet.
Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen eine
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen eine
Geräteliste und zusätzliche Hinweise
Zusätzliches Feature: Online Lesen
Dieses eBook können Sie zusätzlich zum Download auch online im Webbrowser lesen.
Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.
aus dem Bereich