Table of Contents:
  • Subsetting with numeric vectors of indicesSubsetting with logical vectors; Dealing with missing values; Missing values and their effect on data; Detecting missing values in vectors; Performing calculations on vectors with missing values; Writing new functions; Defining our own functions; Setting default values for the arguments; Working with dates and time series; Specialized time series classes in R; Reading climatic data from a CSV file; Converting character values to dates; Examining our time series; Creating subsets based on dates; Introducing graphical functions
  • Calling functions to perform operationsA short sample session; Summary; Chapter 2: Working with Vectors and Time Series; Vectors
  • the basic data structures in R; Different types of vectors; Using the assignment operator to save an object; Removing objects from memory; Summarizing vector properties; Element-by-element operations on vectors; The recycling principle; Using functions with several parameters; Supplying more than one argument in a function call; Creating default vectors; Creating repetitive vectors; Substrings; Creating subsets of vectors
  • Includes bibliographical references and index
  • Displaying vectors using base graphicsSaving graphical output; The main graphical systems in R; Summary; Chapter 3: Working with Tables; Using the data.frame class to represent tabular data; Creating a table from separate vectors; Creating a table from a CSV file; Examining the structure of a data.frame object; Subsetting data.frame objects; Calculating new data fields; Writing a data.frame object to a CSV file; Controlling code execution; Conditioning execution with conditional statements; Repeatedly executing code sections with loops
  • Cover; Copyright; Credits; About the Author; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: The R Environment; Installing R and using the command line; Downloading R; Installing R; Using R as a calculator; Coding with R beyond the command line; Approaches to editing R code; Installation of RStudio; Using RStudio; Evaluating expressions; Using arithmetic and logical operators; Using functions; Dealing with warning and error messages; Getting help; Exploring the basic object types in R; Everything is an object; Storing data in data structures
  • Automated calculations using the apply family of functionsApplying a function on separate parts of a vector; Applying a function on rows or columns of a table; Inference from tables by joining, reshaping, and aggregating; Using contributed packages; Shifting between long and wide formats using melt and dcast; Aggregating with ddply; Joining tables with join; Summary; Chapter 4: Working with Rasters; Using the matrix and array classes; Representing two-dimensional data with a matrix; Representing more than two dimensions with an array; Data structures for rasters in the raster package