R For Dummies

Реклама. ООО «ЛитРес», ИНН: 7719571260.
Оглавление
Vries Andrie de. R For Dummies
Introduction
About This Book
Changes in the Second Edition
Conventions Used in This Book
What You’re Not to Read
Foolish Assumptions
How This Book Is Organized
Icons Used in This Book
Beyond the Book
Where to Go from Here
Part I. Getting Started with R Programming
Chapter 1. Introducing R: The Big Picture
Recognizing the Benefits of Using R
Looking At Some of the Unique Features of R
Chapter 2. Exploring R
Working with a Code Editor
Starting Your First R Session
Sourcing a Script
Navigating the Environment
Chapter 3. The Fundamentals of R
Using the Full Power of Functions
Keeping Your Code Readable
Getting from Base R to More
Part II. Getting Down to Work in R
Chapter 4. Getting Started with Arithmetic
Working with Numbers, Infinity, and Missing Values
Organizing Data in Vectors
Getting Values in and out of Vectors
Working with Logical Vectors
Powering Up Your Math
Chapter 5. Getting Started with Reading and Writing
Using Character Vectors for Text Data
Manipulating Text
Factoring in Factors
Chapter 6. Going on a Date with R
Working with Dates
Presenting Dates in Different Formats
Adding Time Information to Dates
Formatting Dates and Times
Performing Operations on Dates and Times
Chapter 7. Working in More Dimensions
Adding a Second Dimension
Using the Indices
Naming Matrix Rows and Columns
Calculating with Matrices
Adding More Dimensions
Combining Different Types of Values in a Data Frame
Manipulating Values in a Data Frame
Combining Different Objects in a List
Part III. Coding in R
Chapter 8. Putting the Fun in Functions
Moving from Scripts to Functions
Using Arguments the Smart Way
Coping with Scoping
Dispatching to a Method
Chapter 9. Controlling the Logical Flow
Making Choices with if Statements
Doing Something Else with an if..else Statement
Vectorizing Choices
Making Multiple Choices
Looping Through Values
Looping without Loops: Meeting the Apply Family
Chapter 10. Debugging Your Code
Knowing What to Look For
Reading Errors and Warnings
Going Bug Hunting
Generating Your Own Messages
Recognizing the Mistakes You’re Sure to Make
Chapter 11. Getting Help
Finding Information in the R Help Files
Searching the Web for Help with R
Getting Involved in the R Community
Making a Minimal Reproducible Example
Part IV. Making the Data Talk
Chapter 12. Getting Data into and out of R
Getting Data into R
Getting Your Data out of R
Working with Files and Folders
Chapter 13. Manipulating and Processing Data
Deciding on the Most Appropriate Data Structure
Creating Subsets of Your Data
Adding Calculated Fields to Data
Combining and Merging Data Sets
Sorting and Ordering Data
Traversing Your Data with the Apply Functions
Getting to Know the Formula Interface
Whipping Your Data into Shape
Chapter 14. Summarizing Data
Starting with the Right Data
Describing Continuous Variables
Describing Categories
Describing Distributions
Describing Multiple Variables
Working with Tables
Chapter 15. Testing Differences and Relations
Taking a Closer Look at Distributions
Comparing Two Samples
Testing Counts and Proportions
Working with Models
Part V. Working with Graphics
Chapter 16. Using Base Graphics
Creating Different Types of Plots
Controlling Plot Options and Arguments
Saving Graphics to Image Files
Chapter 17. Creating Faceted Graphics with Lattice
Creating a Lattice Plot
Changing Plot Options
Plotting Different Types
Plotting Data in Groups
Printing and Saving a Lattice Plot
Chapter 18. Looking At ggplot 2 Graphics
Installing and Loading ggplot2
Looking At Layers
Using Geoms and Stats
Sussing Stats
Adding Facets, Scales, and Options
Getting More Information
Part VI. The Part of Tens
Chapter 19. Ten Things You Can Do in R That You Would’ve Done in Microsoft Excel
Adding Row and Column Totals
Formatting Numbers
Sorting Data
Making Choices with If
Calculating Conditional Totals
Transposing Columns or Rows
Finding Unique or Duplicated Values
Working with Lookup Tables
Working with Pivot Tables
Using the Goal Seek and Solver
Chapter 20. Ten Tips on Working with Packages
Poking Around the Nooks and Crannies of CRAN
Finding Interesting Packages
Installing Packages
Loading Packages
Reading the Package Manual and Vignette
Updating Packages
Forging Ahead with R-Forge
Getting packages from github
Conducting Installations from BioConductor
Reading the R Manual
Appendix A. Installing R and RStudio
Installing and Configuring R
Installing and Configuring RStudio
Appendix B. The r fordummies Package
Using rfordummies
About the Authors
Dedication
Authors' Acknowledgments
Отрывок из книги
Welcome to R For Dummies, the book that helps you learn the statistical programming language R quickly and easily.
We can’t guarantee that you’ll be a guru if you read this book, but you should be able to
.....
One very handy operator is called sequence, and it looks like a colon (:). Type the following in your console:
That’s more like it. With three keystrokes, you’ve generated a vector with the values 1 through 5. To calculate the sum of this vector, type into your console:
.....