R For Dummies

Book description

Still trying to wrap your head around R?

With more than two million users, R is the open-source programming language standard for data analysis and statistical modeling. R is packed with powerful programming capabilities, but learning to use R in the real world can be overwhelming for even the most seasoned statisticians. This easy-to-follow guide explains how to use R for data processing and statistical analysis, and then, shows you how to present your data using compelling and informative graphics. You'll gain practical experience using R in a variety of settings and delve deeper into R's feature-rich toolset.

  • Includes tips for the initial installation of R

  • Demonstrates how to easily perform calculations on vectors, arrays, and lists of data

  • Shows how to effectively visualize data using R's powerful graphics packages

  • Gives pointers on how to find, install, and use add-on packages created by the R community

  • Provides tips on getting additional help from R mailing lists and websites

Whether you're just starting out with statistical analysis or are a procedural programming pro, R For Dummies is the book you need to get the most out of R.

Table of contents

  1. Cover
  2. Table of Contents
  3. Title Page
  4. Introduction
  5. Part I: R You Ready?
    1. Chapter 1: Introducing R: The Big Picture
      1. Recognizing the Benefits of Using R
      2. Looking At Some of the Unique Features of R
    2. Chapter 2: Exploring R
      1. Working with a Code Editor
      2. Starting Your First R Session
      3. Sourcing a Script
      4. Navigating the Workspace
    3. Chapter 3: The Fundamentals of R
      1. Using the Full Power of Functions
      2. Keeping Your Code Readable
      3. Getting from Base R to More
  6. Part II: Getting Down to Work in R
    1. Chapter 4: Getting Started with Arithmetic
      1. Working with Numbers, Infinity, and Missing Values
      2. Organizing Data in Vectors
      3. Getting Values in and out of Vectors
      4. Working with Logical Vectors
      5. Powering Up Your Math with Vector Functions
    2. Chapter 5: Getting Started with Reading and Writing
      1. Using Character Vectors for Text Data
      2. Manipulating Text
      3. Factoring in Factors
    3. Chapter 6: Going on a Date with R
      1. Working with Dates
      2. Presenting Dates in Different Formats
      3. Adding Time Information to Dates
      4. Formatting Dates and Times
      5. Performing Operations on Dates and Times
    4. Chapter 7: Working in More Dimensions
      1. Adding a Second Dimension
      2. Using the Indices
      3. Naming Matrix Rows and Columns
      4. Calculating with Matrices
      5. Adding More Dimensions
      6. Combining Different Types of Values in a Data Frame
      7. Manipulating Values in a Data Frame
      8. Combining Different Objects in a List
  7. Part III: Coding in R
    1. Chapter 8: Putting the Fun in Functions
      1. Moving from Scripts to Functions
      2. Using Arguments the Smart Way
      3. Coping with Scoping
      4. Dispatching to a Method
    2. Chapter 9: Controlling the Logical Flow
      1. Making Choices with if Statements
      2. Doing Something Else with an if...else Statement
      3. Vectorizing Choices
      4. Making Multiple Choices
      5. Looping Through Values
      6. Looping without Loops: Meeting the Apply Family
    3. Chapter 10: Debugging Your Code
      1. Knowing What to Look For
      2. Reading Errors and Warnings
      3. Going Bug Hunting
      4. Generating Your Own Messages
      5. Recognizing the Mistakes You’re Sure to Make
    4. Chapter 11: Getting Help
      1. Finding Information in the R Help Files
      2. Searching the Web for Help with R
      3. Getting Involved in the R Community
      4. Making a Minimal Reproducible Example
  8. Part IV: Making the Data Talk
    1. Chapter 12: Getting Data into and out of R
      1. Getting Data into R
      2. Getting Your Data out of R
      3. Working with Files and Folders
    2. Chapter 13: Manipulating and Processing Data
      1. Deciding on the Most Appropriate Data Structure
      2. Creating Subsets of Your Data
      3. Adding Calculated Fields to Data
      4. Combining and Merging Data Sets
      5. Sorting and Ordering Data
      6. Traversing Your Data with the Apply Functions
      7. Getting to Know the Formula Interface
      8. Whipping Your Data into Shape
    3. Chapter 14: Summarizing Data
      1. Starting with the Right Data
      2. Describing Continuous Variables
      3. Describing Categories
      4. Describing Distributions
      5. Describing Multiple Variables
      6. Working with Tables
    4. Chapter 15: Testing Differences and Relations
      1. Taking a Closer Look at Distributions
      2. Comparing Two Samples
      3. Testing Counts and Proportions
      4. Working with Models
  9. Part V: Working with Graphics
    1. Chapter 16: Using Base Graphics
      1. Creating Different Types of Plots
      2. Controlling Plot Options and Arguments
      3. Saving Graphics to Image Files
    2. Chapter 17: Creating Faceted Graphics with Lattice
      1. Creating a Lattice Plot
      2. Changing Plot Options
      3. Plotting Different Types
      4. Plotting Data in Groups
      5. Printing and Saving a Lattice Plot
    3. Chapter 18: Looking At ggplot2 Graphics
      1. Installing and Loading ggplot2
      2. Looking At Layers
      3. Using Geoms and Stats
      4. Sussing Stats
      5. Adding Facets, Scales, and Options
      6. Getting More Information
  10. Part VI: The Part of Tens
    1. Chapter 19: Ten Things You Can Do in R That You Would've Done in Microsoft Excel
      1. Adding Row and Column Totals
      2. Formatting Numbers
      3. Sorting Data
      4. Making Choices with If
      5. Calculating Conditional Totals
      6. Transposing Columns or Rows
      7. Finding Unique or Duplicated Values
      8. Working with Lookup Tables
      9. Working with Pivot Tables
      10. Using the Goal Seek and Solver
    2. Chapter 20: Ten Tips on Working with Packages
      1. Poking Around the Nooks and Crannies of CRAN
      2. Finding Interesting Packages
      3. Installing Packages
      4. Loading Packages
      5. Reading the Package Manual and Vignette
      6. Updating Packages
      7. Unloading Packages
      8. Forging Ahead with R-Forge
      9. Conducting Installations from BioConductor
      10. Reading the R Manual
  11. Appendix: Installing R and RStudio
    1. Installing and Configuring R
    2. Installing and Configuring RStudio
  12. Cheat Sheet

Product information

  • Title: R For Dummies
  • Author(s): Joris Meys, Andrie de Vries
  • Release date: July 2012
  • Publisher(s): For Dummies
  • ISBN: 9781119963134