Contents

Foreword

Preface

Acknowledgments

About the Author

1 Getting R

1.1 Downloading R

1.2 R Version

1.3 32-bit versus 64-bit

1.4 Installing

1.5 Revolution R Community Edition

1.6 Conclusion

2 The R Environment

2.1 Command Line Interface

2.2 RStudio

2.3 Revolution Analytics RPE

2.4 Conclusion

3 R Packages

3.1 Installing Packages

3.2 Loading Packages

3.3 Building a Package

3.4 Conclusion

4 Basics of R

4.1 Basic Math

4.2 Variables

4.3 Data Types

4.4 Vectors

4.5 Calling Functions

4.6 Function Documentation

4.7 Missing Data

4.8 Conclusion

5 Advanced Data Structures

5.1 data.frames

5.2 Lists

5.3 Matrices

5.4 Arrays

5.5 Conclusion

6 Reading Data into R

6.1 Reading CSVs

6.2 Excel Data

6.3 Reading from Databases

6.4 Data from Other Statistical Tools

6.5 R Binary Files

6.6 Data Included with R

6.7 Extract Data from Web Sites

6.8 Conclusion

7 Statistical Graphics

7.1 Base Graphics

7.2 ggplot2

7.3 Conclusion

8 Writing R Functions

8.1 Hello, World!

8.2 Function Arguments

8.3 Return Values

8.4 do.call

8.5 Conclusion

9 Control Statements

9.1 if and else

9.2 switch

9.3 ifelse

9.4 Compound Tests

9.5 Conclusion

10 Loops, the Un-R Way to Iterate

10.1 for Loops

10.2 while Loops

10.3 Controlling Loops

10.4 Conclusion

11 Group Manipulation

11.1 Apply Family

11.2 aggregate

11.3 plyr

11.4 data.table

11.5 Conclusion

12 Data Reshaping

12.1 cbind and rbind

12.2 Joins

12.3 reshape2

12.4 Conclusion

13 Manipulating Strings

13.1 paste

13.2 sprintf

13.3 Extracting Text

13.4 Regular Expressions

13.5 Conclusion

14 Probability Distributions

14.1 Normal Distribution

14.2 Binomial Distribution

14.3 Poisson Distribution

14.4 Other Distributions

14.5 Conclusion

15 Basic Statistics

15.1 Summary Statistics

15.2 Correlation and Covariance

15.3 T-Tests

15.4 ANOVA

15.5 Conclusion

16 Linear Models

16.1 Simple Linear Regression

16.2 Multiple Regression

16.3 Conclusion

17 Generalized Linear Models

17.1 Logistic Regression

17.2 Poisson Regression

17.3 Other Generalized Linear Models

17.4 Survival Analysis

17.5 Conclusion

18 Model Diagnostics

18.1 Residuals

18.2 Comparing Models

18.3 Cross-Validation

18.4 Bootstrap

18.5 Stepwise Variable Selection

18.6 Conclusion

19 Regularization and Shrinkage

19.1 Elastic Net

19.2 Bayesian Shrinkage

19.3 Conclusion

20 Nonlinear Models

20.1 Nonlinear Least Squares

20.2 Splines

20.3 Generalized Additive Models

20.4 Decision Trees

20.5 Random Forests

20.6 Conclusion

21 Time Series and Autocorrelation

21.1 Autoregressive Moving Average

21.2 VAR

21.3 GARCH

21.4 Conclusion

22 Clustering

22.1 K-means

22.2 PAM

22.3 Hierarchical Clustering

22.4 Conclusion

23 Reproducibility, Reports and Slide Shows with knitr

23.1 Installing a LATEX Program

23.2 LATEX Primer

23.3 Using knitr with LATEX

23.4 Markdown Tips

23.5 Using knitr and Markdown

23.6 pandoc

23.7 Conclusion

24 Building R Packages

24.1 Folder Structure

24.2 Package Files

24.3 Package Documentation

24.4 Checking, Building and Installing

24.5 Submitting to CRAN

24.6 C++ Code

24.7 Conclusion

A Real-Life Resources

A.1 Meetups

A.2 Stack overflow

A.3 Twitter

A.4 Conferences

A.5 Web Sites

A.6 Documents

A.7 Books

A.8 Conclusion

B Glossary

List of Figures

List of Tables

General Index

Index of Functions

Index of Packages

Index of People

Data Index

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset