This small collection of code recipes for the R programming language and development environment provides simple solutions to common tasks for beginning users of this popular statistical analysis and presentation tool. The work covers statistical functions and various data inputs as well as common graphical representations of data. The recipes are taken from a larger work, R Cookbook, also from O'Reilly, and have been selected as the most useful for new users hoping to perform key functions with this often difficult to understand language. Teetor is a statistical consultant and quantitative developer. Annotation ©2011 Book News, Inc., Portland, OR (booknews.com)
R is a powerful tool for statistics and graphics, but getting started with this language can be frustrating. This short, concise book provides beginners with a selection of how-to recipes to solve simple problems with R. Each solution gives you just what you need to know to use R for basic statistics, graphics, and regression.
You'll find recipes on reading data files, creating data frames, computing basic statistics, testing means and correlations, creating a scatter plot, performing simple linear regression, and many more. These solutions were selected from O'Reilly's R Cookbook, which contains more than 200 recipes for R that you'll find useful once you move beyond the basics.
Preface |
|
vii | |
The Recipes |
|
1 | (1) |
|
1.1 Downloading and Installing R |
|
|
1 | (2) |
|
1.2 Getting Help on a Function |
|
|
3 | (1) |
|
1.3 Viewing the Supplied Documentation |
|
|
4 | (2) |
|
1.4 Searching the Web for Help |
|
|
6 | (2) |
|
1.5 Reading Tabular Datafiles |
|
|
8 | (2) |
|
1.6 Reading from CSV Files |
|
|
10 | (2) |
|
|
12 | (1) |
|
1.8 Computing Basic Statistics |
|
|
13 | (3) |
|
1.9 Initializing a Data Frame from Column Data |
|
|
16 | (1) |
|
1.10 Selecting Data Frame Columns by Position |
|
|
17 | (4) |
|
1.11 Selecting Data Frame Columns by Name |
|
|
21 | (1) |
|
1.12 Forming a Confidence Interval for a Mean |
|
|
22 | (1) |
|
1.13 Forming a Confidence Interval for a Proportion |
|
|
23 | (1) |
|
1.14 Comparing the Means of Two Samples |
|
|
24 | (2) |
|
1.15 Testing a Correlation for Significance |
|
|
26 | (2) |
|
1.16 Creating a Scatter Plot |
|
|
28 | (1) |
|
1.17 Creating a Bar Chart |
|
|
29 | (1) |
|
|
30 | (2) |
|
1.19 Creating a Histogram |
|
|
32 | (1) |
|
1.20 Performing Simple Linear Regression |
|
|
33 | (1) |
|
1.21 Performing Multiple Linear Regression |
|
|
34 | (2) |
|
1.22 Getting Regression Statistics |
|
|
36 | (3) |
|
1.23 Diagnosing a Linear Regression |
|
|
39 | (3) |
|
1.24 Predicting New Values |
|
|
42 | (1) |
|
1.25 Accessing the Functions in a Package |
|
|
43 | |
Paul Teetor is a quantitative developer with Masters degrees in statistics and computer science. He specializes in analytics and software engineering for investment management, securities trading, and risk management. He works with hedge funds, market makers, and portfolio managers in the greater Chicago area.