Since its inception, R has become one of the preeminent programs for statistical computing and data analysis. The ready availability of the program, along with a wide variety of packages and the supportive R community make R an excellent choice for almost any kind of computing task related to stat
Data Manipulation with R (Use R)
β Scribed by Phil Spector
- Publisher
- Springer
- Year
- 2008
- Tongue
- English
- Leaves
- 158
- Edition
- 1
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
This book presents a wide array of methods applicable for reading data into R, and efficiently manipulating that data. In addition to the built-in functions, a number of readily available packages from CRAN (the Comprehensive R Archive Network) are also covered. All of the methods presented take advantage of the core features of R: vectorization, efficient use of subscripting, and the proper use of the varied functions in R that are provided for common data management tasks. Most experienced R users discover that, especially when working with large data sets, it may be helpful to use other programs, notably databases, in conjunction with R. Accordingly, the use of databases in R is covered in detail, along with methods for extracting data from spreadsheets and datasets created by other programs. Character manipulation, while sometimes overlooked within R, is also covered in detail, allowing problems that are traditionally solved by scripting languages to be carried out entirely within R. For users with experience in other languages, guidelines for the effective use of programming constructs like loops are provided. Since many statistical modeling and graphics functions need their data presented in a data frame, techniques for converting the output of commonly used functions to data frames are provided throughout the book.
β¦ Table of Contents
Contents......Page 8
Preface......Page 6
1.1 Modes and Classes......Page 11
1.2 Data Storage in R......Page 12
1.4 Structure of R Objects......Page 17
1.5 Conversion of Objects......Page 18
1.7 Working with Missing Values......Page 20
2.1 Reading Vectors and Matrices......Page 22
2.2 Data Frames: read.table......Page 24
2.4 Fixed-Width Input Files......Page 26
2.5 Extracting Data from R Objects......Page 27
2.6 Connections......Page 32
2.7 Reading Large Data Files......Page 34
2.8.1 Sequences......Page 36
2.8.2 Random Numbers......Page 38
2.9.2 Enumerating All Permutations......Page 39
2.10 Working with Sequences......Page 40
2.11.1 The RODBC Package on Windows......Page 42
2.11.2 The gdata Package (All Platforms)......Page 43
2.12 Saving and Loading R Data Objects......Page 44
2.13 Working with Binary Files......Page 45
2.14.1 The write Function......Page 47
2.15 Reading Data from Other Programs......Page 48
3.1.1 Navigation Commands......Page 51
3.1.2 Basics of SQL......Page 52
3.1.3 Aggregation......Page 53
3.1.4 Joining Two Databases......Page 54
3.1.5 Subqueries......Page 55
3.1.6 Modifying Database Records......Page 56
3.2 ODBC......Page 57
3.3 Using the RODBC Package......Page 58
3.5 Accessing a MySQL Database......Page 59
3.7 Normalized Tables......Page 60
3.8 Getting Data into MySQL......Page 61
3.9 More Complex Aggregations......Page 63
4.1 as.Date......Page 65
4.2 The chron Package......Page 67
4.3 POSIX Classes......Page 68
4.4 Working with Dates......Page 71
4.5 Time Intervals......Page 72
4.6 Time Sequences......Page 73
5.1 Using Factors......Page 75
5.3 Manipulating Factors......Page 78
5.4 Creating Factors from Continuous Variables......Page 80
5.5 Factors Based on Dates and Times......Page 81
5.6 Interactions......Page 82
6.3 Character Subscripts......Page 83
6.4 Logical Subscripts......Page 84
6.5 Subscripting Matrices and Arrays......Page 85
6.6 Specialized Functions for Matrices......Page 89
6.7 Lists......Page 90
6.8 Subscripting Data Frames......Page 91
7.2 Displaying and Concatenating Character Strings......Page 94
7.3 Working with Parts of Character Values......Page 96
7.4 Regular Expressions in R......Page 97
7.5 Basics of Regular Expressions......Page 98
7.6 Breaking Apart Character Values......Page 100
7.7 Using Regular Expressions in R......Page 101
7.8 Substitutions and Tagging......Page 105
8.1 table......Page 107
8.2 Road Map for Aggregation......Page 112
8.3 Mapping a Function to a Vector or List......Page 113
8.4 Mapping a function to a matrix or array......Page 116
8.5 Mapping a Function Based on Groups......Page 119
8.6 The reshape Package......Page 126
8.7 Loops in R......Page 132
9.1 Modifying Data Frame Variables......Page 137
9.2 Recoding Variables......Page 138
9.3 The recode Function......Page 140
9.4 Reshaping Data Frames......Page 141
9.5 The reshape Package......Page 146
9.6 Combining Data Frames......Page 148
9.7 Under the Hood of merge......Page 152
D......Page 154
M......Page 155
R......Page 156
Z......Page 157
β¦ Subjects
ΠΠΈΠ±Π»ΠΈΠΎΡΠ΅ΠΊΠ°;ΠΠΎΠΌΠΏΡΡΡΠ΅ΡΠ½Π°Ρ Π»ΠΈΡΠ΅ΡΠ°ΡΡΡΠ°;R;
π SIMILAR VOLUMES
<p><P>Since its inception, R has become one of the preeminent programs for statistical computing and data analysis. The ready availability of the program, along with a wide variety of packages and the supportive R community make R an excellent choice for almost any kind of computing task related to
One of the most important aspects of computing with data is the ability to manipulate it to enable subsequent analysis and visualization. R offers a wide range of tools for this purpose. Data from any source, be it flat files or databases, can be loaded into R and this will allow you to manipulate d
This book is for all those who wish to learn about data manipulation from scratch and excel at aggregating data effectively. It is expected that you have basic knowledge of R and have previously done some basic administration work with R.</div> <br> Abstract: This book is for all those w
<b>Perform groupwise data manipulation and deal with large datasets using R efficiently and effectively</b><h2>About This Book</h2><ul><li>Perform factor manipulation and string processing</li> <li>Learn group-wise data manipulation using plyr</li> <li>Handle large datasets, interact with database s
Since its inception, R has become one of the preeminent programs for statistical computing and data analysis. The ready availability of the program, along with a wide variety of packages and the supportive R community make R an excellent choice for almost any kind of computing task related to statis